diff --git a/functions b/functions index f8d194c7..10b54a1f 100644 --- a/functions +++ b/functions @@ -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 diff --git a/grenade.sh b/grenade.sh index e8be0b79..75ee74eb 100755 --- a/grenade.sh +++ b/grenade.sh @@ -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 diff --git a/inc/bootstrap b/inc/bootstrap index 0ec421d1..839b30a3 100644 --- a/inc/bootstrap +++ b/inc/bootstrap @@ -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 diff --git a/inc/upgrade b/inc/upgrade index adfab5bc..15db9cc5 100644 --- a/inc/upgrade +++ b/inc/upgrade @@ -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 diff --git a/projects/10_keystone/from-juno/upgrade-keystone b/projects/10_keystone/from-juno/upgrade-keystone index f69176b1..e93ac456 100755 --- a/projects/10_keystone/from-juno/upgrade-keystone +++ b/projects/10_keystone/from-juno/upgrade-keystone @@ -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 } diff --git a/projects/50_neutron/from-juno/upgrade-neutron b/projects/50_neutron/from-juno/upgrade-neutron index 1988197b..25b805be 100644 --- a/projects/50_neutron/from-juno/upgrade-neutron +++ b/projects/50_neutron/from-juno/upgrade-neutron @@ -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 } diff --git a/projects/60_nova/from-kilo/upgrade-nova b/projects/60_nova/from-kilo/upgrade-nova index a72e625b..e182065f 100644 --- a/projects/60_nova/from-kilo/upgrade-nova +++ b/projects/60_nova/from-kilo/upgrade-nova @@ -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 }