523f488036
I noticed this when debugging some grenade issues failures. An include of grenade/functions stores the current value of XTRACE (on) and disables xtrace for the rest of the import. We then include devstack's "functions" library, which now overwrites the stored value of XTRACE the current state; i.e. disabled. When it finishes it restores the prior state (disabled), and then grenade restores the same value of XTRACE (disabled). The result is that xtrace is incorrectly disabled until the next time it just happens to be turned on. The solution is to name-space the store of the current-value of xtrace so when we finish sourcing a file, we always restore the tracing value to what it was when we entered. Some files had already discovered this. In general there is inconsistency around the setting of the variable, and a lot of obvious copy-paste. This brings consistency across all files by using _XTRACE_* prefixes for the sotre/restore of tracing values. Change-Id: Iba7739eada5711d9c269cb4127fa712e9f961695
30 lines
803 B
Bash
30 lines
803 B
Bash
#!/bin/bash
|
|
|
|
# Neutron firewall plugin
|
|
# ---------------------------
|
|
|
|
# Save trace setting
|
|
_XTRACE_NEUTRON_FIREWALL=$(set +o | grep xtrace)
|
|
set +o xtrace
|
|
|
|
FWAAS_PLUGIN=neutron_fwaas.services.firewall.fwaas_plugin.FirewallPlugin
|
|
|
|
function neutron_fwaas_configure_common {
|
|
_neutron_service_plugin_class_add $FWAAS_PLUGIN
|
|
}
|
|
|
|
function neutron_fwaas_configure_driver {
|
|
FWAAS_DRIVER_CONF_FILENAME=/etc/neutron/fwaas_driver.ini
|
|
cp $NEUTRON_FWAAS_DIR/etc/fwaas_driver.ini $FWAAS_DRIVER_CONF_FILENAME
|
|
|
|
iniset_multiline $FWAAS_DRIVER_CONF_FILENAME fwaas enabled True
|
|
iniset_multiline $FWAAS_DRIVER_CONF_FILENAME fwaas driver "neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver"
|
|
}
|
|
|
|
function neutron_fwaas_stop {
|
|
:
|
|
}
|
|
|
|
# Restore xtrace
|
|
$_XTRACE_NEUTRON_FIREWALL
|