Browse Source

gate-hook: Accomodate devstack-gate local.conf changes

With devstack-gate switching to local.conf we can no longer use bash for
evaluating settings variables. Also we shouldn't populate local.conf
directly and let devstack-gate do that.

Since now devstack never uses localrc file directly, we set [[localrc]]
sections for local.conf instead.

As a nice side effect, it will make the gate hook work with devstack
that may not have the Ie571b5fa5a33d9ed09f30ba7c7724b958ce17616 in
(Newton and below), which may make backports easier later.

Change-Id: Ibe640a584add3acc89520a2bbb25b6f4c5818e1b
Closes-bug: 1667331
changes/70/438070/4
Jakub Libosvar 5 years ago
committed by Ihar Hrachyshka
parent
commit
d46636112f
  1. 16
      neutron/tests/contrib/gate_hook.sh
  2. 46
      neutron/tests/contrib/hooks/api_all_extensions
  3. 45
      neutron/tests/contrib/hooks/api_dvrskip_extensions
  4. 1
      neutron/tests/contrib/hooks/dstat
  5. 1
      neutron/tests/contrib/hooks/stack_base

16
neutron/tests/contrib/gate_hook.sh

@ -19,6 +19,7 @@ function load_rc_hook {
config=$(cat $GATE_HOOKS/$hook)
export DEVSTACK_LOCAL_CONFIG+="
# generated from hook '$hook'
[[local|localrc]]
${config}
"
}
@ -27,7 +28,11 @@ ${config}
# Inject config from hook into local.conf
function load_conf_hook {
local hook="$1"
cat $GATE_HOOKS/$hook >> $LOCAL_CONF
config=$(cat $GATE_HOOKS/$hook)
export DEVSTACK_LOCAL_CONFIG+="
# generated from hook '$hook'
${config}
"
}
@ -68,10 +73,15 @@ case $VENV in
upgrade_ovs_if_necessary $compile_modules
# prepare base environment for ./stack.sh
load_conf_hook stack_base
load_rc_hook stack_base
# enable monitoring
load_conf_hook dstat
load_rc_hook dstat
# Since we don't use devstack-gate to deploy devstack services, we need to
# dump DEVSTACK_LOCAL_CONFIG into local.conf ourselves. Note that we should
# dump the file before changing the ownership
echo "$DEVSTACK_LOCAL_CONFIG" > $LOCAL_CONF
# Make the workspace owned by the stack user
sudo chown -R $STACK_USER:$STACK_USER $BASE

46
neutron/tests/contrib/hooks/api_all_extensions

@ -1,45 +1 @@
NETWORK_API_EXTENSIONS="
address-scope, \
agent, \
allowed-address-pairs, \
auto-allocated-topology, \
availability_zone, \
binding, \
default-subnetpools, \
dhcp_agent_scheduler, \
dns-integration, \
dvr, \
ext-gw-mode, \
external-net, \
extra_dhcp_opt, \
extraroute, \
flavors, \
l3-flavors, \
l3-ha, \
l3_agent_scheduler, \
metering, \
multi-provider, \
net-mtu, \
network-ip-availability, \
network_availability_zone, \
pagination, \
port-security, \
project-id, \
provider, \
qos, \
quotas, \
rbac-policies, \
router, \
router_availability_zone, \
security-group, \
service-type, \
sorting, \
standard-attr-description, \
standard-attr-revisions, \
standard-attr-timestamp, \
subnet_allocation, \
tag, \
tag-ext, \
trunk, \
trunk-details"
NETWORK_API_EXTENSIONS="$(echo $NETWORK_API_EXTENSIONS | tr -d ' ')"
NETWORK_API_EXTENSIONS="address-scope,agent,allowed-address-pairs,auto-allocated-topology,availability_zone,binding,default-subnetpools,dhcp_agent_scheduler,dns-integration,dvr,ext-gw-mode,external-net,extra_dhcp_opt,extraroute,flavors,l3-flavors,l3-ha,l3_agent_scheduler,metering,multi-provider,net-mtu,network-ip-availability,network_availability_zone,pagination,port-security,project-id,provider,qos,quotas,rbac-policies,router,router_availability_zone,security-group,service-type,sorting,standard-attr-description,standard-attr-revisions,standard-attr-timestamp,subnet_allocation,tag,tag-ext,trunk,trunk-details"

45
neutron/tests/contrib/hooks/api_dvrskip_extensions

@ -1,44 +1 @@
NETWORK_API_EXTENSIONS="
address-scope, \
agent, \
allowed-address-pairs, \
auto-allocated-topology, \
availability_zone, \
binding, \
default-subnetpools, \
dhcp_agent_scheduler, \
dns-integration, \
ext-gw-mode, \
external-net, \
extra_dhcp_opt, \
extraroute, \
flavors, \
l3-flavors, \
l3-ha, \
l3_agent_scheduler, \
metering, \
multi-provider, \
net-mtu, \
network-ip-availability, \
network_availability_zone, \
pagination, \
port-security, \
project-id, \
provider, \
qos, \
quotas, \
rbac-policies, \
router, \
router_availability_zone, \
security-group, \
service-type, \
sorting, \
standard-attr-description, \
standard-attr-revisions, \
standard-attr-timestamp, \
subnet_allocation, \
tag, \
tag-ext, \
trunk, \
trunk-details"
NETWORK_API_EXTENSIONS="$(echo $NETWORK_API_EXTENSIONS | tr -d ' ')"
NETWORK_API_EXTENSIONS="address-scope,agent,allowed-address-pairs,auto-allocated-topology,availability_zone,binding,default-subnetpools,dhcp_agent_scheduler,dns-integration,ext-gw-mode,external-net,extra_dhcp_opt,extraroute,flavors,l3-flavors,l3-ha,l3_agent_scheduler,metering,multi-provider,net-mtu,network-ip-availability,network_availability_zone,pagination,port-security,project-id,provider,qos,quotas,rbac-policies,router,router_availability_zone,security-group,service-type,sorting,standard-attr-description,standard-attr-revisions,standard-attr-timestamp,subnet_allocation,tag,tag-ext,trunk,trunk-details"

1
neutron/tests/contrib/hooks/dstat

@ -1,2 +1 @@
[[local|localrc]]
enable_service dstat

1
neutron/tests/contrib/hooks/stack_base

@ -1,4 +1,3 @@
[[local|localrc]]
# set password, otherwise devstack enters interactive mode and fails
ADMIN_PASSWORD=secretadmin
# don't use screen to start services (needed to disable colorization in

Loading…
Cancel
Save