Merge "Namespace XTRACE calls"

This commit is contained in:
Jenkins 2015-10-28 02:24:32 +00:00 committed by Gerrit Code Review
commit a094593dce
7 changed files with 25 additions and 10 deletions

View File

@ -26,7 +26,7 @@
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_GRENADE_FUNCTIONS=$(set +o | grep xtrace)
set +o xtrace
# Include the common functions
@ -128,4 +128,4 @@ FSSH="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
# Restore xtrace
$XTRACE
$_XTRACE_GRENADE_FUNCTIONS

View File

@ -189,7 +189,9 @@ export TOP_DIR=$TARGET_DEVSTACK_DIR
# Collect the ENABLED_SERVICES from the base directory, this is what
# we are starting with.
ENABLED_SERVICES=$(source $BASE_DEVSTACK_DIR/stackrc; echo $ENABLED_SERVICES)
ENABLED_SERVICES=$(set +o xtrace &&
source $BASE_DEVSTACK_DIR/stackrc &&
echo $ENABLED_SERVICES)
# Fetch all the grenade plugins which were registered in ``pluginrc``
# via the ``enable_grenade_plugin`` stanza. This must be done before

View File

@ -46,12 +46,18 @@
# This function should be used to send messages out to the summary log
# file which makes for good high level progress monitoring.
function echo_summary {
local xtrace
xtrace=$(set +o | grep xtrace)
set +o xtrace
echo $@ >&6
echo
echo "#********************************************"
echo "# " $@
echo "#********************************************"
echo
$xtrace
}
# Stop at a specific phase

View File

@ -29,7 +29,10 @@ function save_mysql_dbs {
local release=$1
local dir=$2
# pull the mysql pass from the old config
local mysql_pass=$(source $dir/stackrc && echo $MYSQL_PASSWORD)
local mysql_pass=$(
set +o xtrace &&
source $dir/stackrc &&
echo $MYSQL_PASSWORD)
for db in $DATABASES_TO_SAVE; do
mysqldump -uroot -p$mysql_pass $db >$SAVE_DIR/$db.sql.$release
done

View File

@ -14,7 +14,8 @@ function get_new_values {
}
function configure_keystone_upgrade {
XTRACE=$(set +o | grep xtrace)
local xtrace
xtrace=$(set +o | grep xtrace)
set -o xtrace
# Remove XmlBodyMiddleware from the keystone-paste.ini file. All
@ -55,5 +56,5 @@ function configure_keystone_upgrade {
iniset $KEYSTONE_PASTE_INI pipeline:admin_version_api pipeline "$admin_api_values"
## reset to previous state
$XTRACE
$xtrace
}

View File

@ -3,11 +3,12 @@
# ``upgrade-neutron``
function configure_neutron_upgrade {
XTRACE=$(set +o | grep xtrace)
local xtrace
xtrace=$(set +o | grep xtrace)
set -o xtrace
# Apply new rootwrap dhcp.filters because of dnsmasq env variable change
sudo cp -f $TARGET_RELEASE_DIR/neutron/etc/neutron/rootwrap.d/dhcp.filters $NEUTRON_CONF_DIR/rootwrap.d/
$XTRACE
$xtrace
}

View File

@ -3,11 +3,13 @@
# ``upgrade-nova``
function configure_nova_upgrade {
XTRACE=$(set +o | grep xtrace)
local xtrace
xtrace=$(set +o | grep xtrace)
set -o xtrace
# Apply new rootwrap compute.filters
sudo cp -f $TARGET_RELEASE_DIR/nova/etc/nova/rootwrap.d/compute.filters $NOVA_CONF_DIR/rootwrap.d/
# reset to previous state
$XTRACE
$xtrace
}