Namespace XTRACE commands

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
This commit is contained in:
Ian Wienand 2015-10-13 11:03:03 +11:00
parent 307730acd9
commit 523f488036
63 changed files with 134 additions and 128 deletions

View File

@ -22,7 +22,7 @@ source ${FUNC_DIR}/inc/python
source ${FUNC_DIR}/inc/rootwrap
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_FUNCTIONS=$(set +o | grep xtrace)
set +o xtrace
# Check if a function already exists
@ -603,7 +603,7 @@ function create_disk {
}
# Restore xtrace
$XTRACE
$_XTRACE_FUNCTIONS
# Local variables:
# mode: shell-script

View File

@ -32,7 +32,7 @@
#
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_FUNCTIONS_COMMON=$(set +o | grep xtrace)
set +o xtrace
# ensure we don't re-source this in the same environment
@ -2254,7 +2254,7 @@ function time_totals {
}
# Restore xtrace
$XTRACE
$_XTRACE_FUNCTIONS_COMMON
# Local variables:
# mode: shell-script

View File

@ -20,7 +20,7 @@
# file-name is the destination of the config file
# Save trace setting
INC_META_XTRACE=$(set +o | grep xtrace)
_XTRACE_INC_META=$(set +o | grep xtrace)
set +o xtrace
@ -197,7 +197,7 @@ function merge_config_group {
# Restore xtrace
$INC_META_XTRACE
$_XTRACE_INC_META
# Local variables:
# mode: shell-script

View File

@ -19,7 +19,7 @@
# - restart_apache_server
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_LIB_APACHE=$(set +o | grep xtrace)
set +o xtrace
# Allow overriding the default Apache user and group, default to
@ -191,7 +191,7 @@ function restart_apache_server {
}
# Restore xtrace
$XTRACE
$_XTRACE_LIB_APACHE
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -18,7 +18,7 @@
# - cleanup_ceph
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_LIB_CEPH=$(set +o | grep xtrace)
set +o xtrace
@ -375,7 +375,7 @@ function stop_ceph {
# Restore xtrace
$XTRACE
$_XTRACE_LIB_CEPH
## Local variables:
## mode: shell-script

View File

@ -20,7 +20,7 @@
# - cleanup_cinder
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER=$(set +o | grep xtrace)
set +o xtrace
@ -567,7 +567,7 @@ function create_cinder_volume_group {
# Restore xtrace
$XTRACE
$_XTRACE_CINDER
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -22,7 +22,7 @@
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER_CEPH=$(set +o | grep xtrace)
set +o xtrace
@ -76,7 +76,7 @@ function configure_cinder_backend_ceph {
}
# Restore xtrace
$MY_XTRACE
$_XTRACE_CINDER_CEPH
# Local variables:
# mode: shell-script

View File

@ -19,7 +19,7 @@
# configure_cinder_backend_glusterfs - Configure Cinder for GlusterFS backends
# Save trace setting
GLUSTERFS_XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER_GLUSTERFS=$(set +o | grep xtrace)
set +o xtrace
@ -41,7 +41,7 @@ function configure_cinder_backend_glusterfs {
# Restore xtrace
$GLUSTERFS_XTRACE
$_XTRACE_CINDER_GLUSTERFS
# Local variables:
# mode: shell-script

View File

@ -22,7 +22,7 @@
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER_LVM=$(set +o | grep xtrace)
set +o xtrace
@ -68,7 +68,7 @@ function init_cinder_backend_lvm {
}
# Restore xtrace
$MY_XTRACE
$_XTRACE_CINDER_LVM
# mode: shell-script
# End:

View File

@ -20,7 +20,7 @@
# configure_cinder_backend_netapp_iscsi - configure iSCSI
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER_NETAPP=$(set +o | grep xtrace)
set +o xtrace
@ -59,7 +59,7 @@ function configure_cinder_backend_netapp_iscsi {
# Restore xtrace
$MY_XTRACE
$_XTRACE_CINDER_NETAPP
# Local variables:
# mode: shell-script

View File

@ -20,7 +20,7 @@
# configure_cinder_backend_netapp_nfs - configure NFS
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER_NETAPP=$(set +o | grep xtrace)
set +o xtrace
@ -70,7 +70,7 @@ function cleanup_cinder_backend_netapp_nfs {
# Restore xtrace
$MY_XTRACE
$_XTRACE_CINDER_NETAPP
# Local variables:
# mode: shell-script

View File

@ -19,7 +19,7 @@
# configure_cinder_backend_nfs - Configure Cinder for NFS backends
# Save trace setting
NFS_XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER_NFS=$(set +o | grep xtrace)
set +o xtrace
@ -38,7 +38,7 @@ function configure_cinder_backend_nfs {
# Restore xtrace
$NFS_XTRACE
$_XTRACE_CINDER_NFS
# Local variables:
# mode: shell-script

View File

@ -17,7 +17,7 @@
# configure_cinder_driver - make configuration changes, including those to other services
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER_SOLIDFIRE=$(set +o | grep xtrace)
set +o xtrace
@ -42,7 +42,7 @@ function configure_cinder_backend_solidfire {
# Restore xtrace
$MY_XTRACE
$_XTRACE_CINDER_SOLIDFIRE
# Local variables:
# mode: shell-script

View File

@ -15,7 +15,7 @@
# configure_cinder_backend_vmdk - Configure Cinder for VMware vmdk backends
# Save trace setting
VMDK_XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER_VMDK=$(set +o | grep xtrace)
set +o xtrace
@ -40,7 +40,7 @@ function configure_cinder_backend_vmdk {
# Restore xtrace
$VMDK_XTRACE
$_XTRACE_CINDER_VMDK
# Local variables:
# mode: shell-script

View File

@ -42,7 +42,7 @@
# configure_cinder_backend_xiv - Configure Cinder for xiv backends
# Save trace setting
XIV_XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER_XIV=$(set +o | grep xtrace)
set +o xtrace
# Defaults
@ -79,7 +79,7 @@ function configure_cinder_backend_xiv {
}
# Restore xtrace
$XIV_XTRACE
$_XTRACE_CINDER_XIV
# Local variables:
# mode: shell-script

View File

@ -15,7 +15,7 @@
# configure_cinder_driver - make configuration changes, including those to other services
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER_XENAPINFS=$(set +o | grep xtrace)
set +o xtrace
@ -39,7 +39,7 @@ function configure_cinder_driver {
}
# Restore xtrace
$MY_XTRACE
$_XTRACE_CINDER_XENAPINFS
# Local variables:
# mode: shell-script

View File

@ -15,7 +15,7 @@
# configure_cinder_driver - make configuration changes, including those to other services
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER_GLUSTERFS=$(set +o | grep xtrace)
set +o xtrace
@ -45,7 +45,7 @@ function configure_cinder_driver {
}
# Restore xtrace
$MY_XTRACE
$_XTRACE_CINDER_GLUSTERFS
# Local variables:
# mode: shell-script

View File

@ -15,7 +15,7 @@
# configure_cinder_driver - make configuration changes, including those to other services
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER_NFS=$(set +o | grep xtrace)
set +o xtrace
@ -36,7 +36,7 @@ function configure_cinder_driver {
}
# Restore xtrace
$MY_XTRACE
$_XTRACE_CINDER_NFS
# Local variables:
# mode: shell-script

View File

@ -15,7 +15,7 @@
# configure_cinder_driver - make configuration changes, including those to other services
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER_SHEEPDOG=$(set +o | grep xtrace)
set +o xtrace
@ -34,7 +34,7 @@ function configure_cinder_driver {
}
# Restore xtrace
$MY_XTRACE
$_XTRACE_CINDER_SHEEPDOG
# Local variables:
# mode: shell-script

View File

@ -15,7 +15,7 @@
# configure_cinder_driver - make configuration changes, including those to other services
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_CINDER_VSPHERE=$(set +o | grep xtrace)
set +o xtrace
@ -37,7 +37,7 @@ function configure_cinder_driver {
}
# Restore xtrace
$MY_XTRACE
$_XTRACE_CINDER_VSPHERE
# Local variables:
# mode: shell-script

View File

@ -20,7 +20,7 @@
# and call register_database $DATABASE_TYPE
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_LIB_DB=$(set +o | grep xtrace)
set +o xtrace
DATABASE_BACKENDS=""
@ -137,7 +137,7 @@ function database_connection_url {
# Restore xtrace
$XTRACE
$_XTRACE_LIB_DB
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -8,7 +8,7 @@
# - DATABASE_{HOST,USER,PASSWORD} must be defined
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_DB_MYSQL=$(set +o | grep xtrace)
set +o xtrace
MYSQL_DRIVER=${MYSQL_DRIVER:-PyMySQL}
@ -178,7 +178,7 @@ function database_connection_url_mysql {
# Restore xtrace
$MY_XTRACE
$_XTRACE_DB_MYSQL
# Local variables:
# mode: shell-script

View File

@ -8,7 +8,7 @@
# - DATABASE_{HOST,USER,PASSWORD} must be defined
# Save trace setting
PG_XTRACE=$(set +o | grep xtrace)
_XTRACE_PG=$(set +o | grep xtrace)
set +o xtrace
@ -119,7 +119,7 @@ function database_connection_url_postgresql {
# Restore xtrace
$PG_XTRACE
$_XTRACE_PG
# Local variables:
# mode: shell-script

View File

@ -19,7 +19,7 @@
# - cleanup_dlm
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_DLM=$(set +o | grep xtrace)
set +o xtrace
@ -100,7 +100,7 @@ function install_dlm {
}
# Restore xtrace
$XTRACE
$_XTRACE_DLM
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -13,7 +13,7 @@
# - stop_dstat
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_DSTAT=$(set +o | grep xtrace)
set +o xtrace
# start_dstat() - Start running processes, including screen
@ -34,4 +34,4 @@ function stop_dstat {
}
# Restore xtrace
$XTRACE
$_XTRACE_DSTAT

View File

@ -21,7 +21,7 @@
# - cleanup_glance
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_GLANCE=$(set +o | grep xtrace)
set +o xtrace
@ -403,7 +403,7 @@ function stop_glance {
}
# Restore xtrace
$XTRACE
$_XTRACE_GLANCE
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -23,7 +23,7 @@
# - cleanup_heat
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_HEAT=$(set +o | grep xtrace)
set +o xtrace
@ -464,7 +464,7 @@ function build_heat_pip_mirror {
}
# Restore xtrace
$XTRACE
$_XTRACE_HEAT
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -19,7 +19,7 @@
# - cleanup_horizon
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_HORIZON=$(set +o | grep xtrace)
set +o xtrace
@ -193,7 +193,7 @@ function _prepare_message_catalog_compilation {
# Restore xtrace
$XTRACE
$_XTRACE_HORIZON
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -15,7 +15,7 @@
# - install_infra
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_INFRA=$(set +o | grep xtrace)
set +o xtrace
@ -50,7 +50,7 @@ function install_infra {
}
# Restore xtrace
$XTRACE
$_XTRACE_INFRA
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -21,8 +21,8 @@
# - cleanup_ironic
# Save trace and pipefail settings
XTRACE=$(set +o | grep xtrace)
PIPEFAIL=$(set +o | grep pipefail)
_XTRACE_IRONIC=$(set +o | grep xtrace)
_PIPEFAIL_IRONIC=$(set +o | grep pipefail)
set +o xtrace
set +o pipefail
@ -855,8 +855,8 @@ function cleanup_baremetal_basic_ops {
}
# Restore xtrace + pipefail
$XTRACE
$PIPEFAIL
$_XTRACE_IRONIC
$_PIPEFAIL_IRONIC
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -28,7 +28,7 @@
# - _cleanup_keystone_apache_wsgi
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_KEYSTONE=$(set +o | grep xtrace)
set +o xtrace
# Defaults
@ -592,7 +592,7 @@ function stop_keystone {
# Restore xtrace
$XTRACE
$_XTRACE_KEYSTONE
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -8,7 +8,7 @@
# - install_ldap()
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_LDAP=$(set +o | grep xtrace)
set +o xtrace
@ -166,7 +166,7 @@ function clear_ldap_state {
}
# Restore xtrace
$XTRACE
$_XTRACE_LDAP
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -16,7 +16,7 @@
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_LVM=$(set +o | grep xtrace)
set +o xtrace
@ -182,7 +182,7 @@ function set_lvm_filter {
}
# Restore xtrace
$MY_XTRACE
$_XTRACE_LVM
# mode: shell-script
# End:

View File

@ -357,7 +357,7 @@ else
fi
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON=$(set +o | grep xtrace)
set +o xtrace
@ -1492,7 +1492,7 @@ function is_provider_network {
# Restore xtrace
$XTRACE
$_XTRACE_NEUTRON
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -4,7 +4,7 @@
# ------------------------------------
# Save trace setting
BS_XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON_BIGSWITCH=$(set +o | grep xtrace)
set +o xtrace
source $TOP_DIR/lib/neutron_plugins/ovs_base
@ -75,4 +75,4 @@ function neutron_plugin_check_adv_test_requirements {
}
# Restore xtrace
$BS_XTRACE
$_XTRACE_NEUTRON_BIGSWITCH

View File

@ -4,7 +4,7 @@
# ----------------------
# Save trace setting
BRCD_XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON_BROCADE=$(set +o | grep xtrace)
set +o xtrace
function is_neutron_ovs_base_plugin {
@ -81,4 +81,4 @@ function neutron_plugin_check_adv_test_requirements {
}
# Restore xtrace
$BRCD_XTRACE
$_XTRACE_NEUTRON_BROCADE

View File

@ -4,7 +4,7 @@
# ---------------------------
# Save trace setting
CISCO_XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON_CISCO=$(set +o | grep xtrace)
set +o xtrace
# Scecify the VSM parameters
@ -154,4 +154,4 @@ function neutron_plugin_setup_interface_driver {
}
# Restore xtrace
$CISCO_XTRACE
$_XTRACE_NEUTRON_CISCO

View File

@ -4,7 +4,7 @@
# ---------------------------
# Save trace setting
EMBR_XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON_EMBR=$(set +o | grep xtrace)
set +o xtrace
source $TOP_DIR/lib/neutron_plugins/openvswitch
@ -39,4 +39,5 @@ function neutron_plugin_configure_service {
}
# Restore xtrace
$EMBR_XTRACE
$_XTRACE_NEUTRON_EMBR

View File

@ -4,7 +4,7 @@
# -----------------------------
# Save trace setting
PLUGIN_XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON_LB=$(set +o | grep xtrace)
set +o xtrace
function neutron_lb_cleanup {
@ -93,4 +93,4 @@ function neutron_plugin_check_adv_test_requirements {
}
# Restore xtrace
$PLUGIN_XTRACE
$_XTRACE_NEUTRON_LB

View File

@ -4,7 +4,7 @@
# ------------------------------
# Save trace setting
ML2_XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON_ML2=$(set +o | grep xtrace)
set +o xtrace
# Enable this to simply and quickly enable tunneling with ML2.
@ -137,4 +137,4 @@ function has_neutron_plugin_security_group {
}
# Restore xtrace
$ML2_XTRACE
$_XTRACE_NEUTRON_ML2

View File

@ -4,7 +4,7 @@
# ----------------------
# Save trace setting
NU_XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON_NU=$(set +o | grep xtrace)
set +o xtrace
function neutron_plugin_create_nova_conf {
@ -66,4 +66,4 @@ function has_neutron_plugin_security_group {
}
# Restore xtrace
$NU_XTRACE
$_XTRACE_NEUTRON_NU

View File

@ -7,7 +7,7 @@
# which has been removed in Juno.
# Save trace setting
OVS_XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON_OVS=$(set +o | grep xtrace)
set +o xtrace
source $TOP_DIR/lib/neutron_plugins/openvswitch_agent
@ -56,4 +56,5 @@ function has_neutron_plugin_security_group {
}
# Restore xtrace
$OVS_XTRACE
$_XTRACE_NEUTRON_OVS

View File

@ -4,7 +4,7 @@
# -----------------------------
# Save trace setting
OVSA_XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON_OVSL2=$(set +o | grep xtrace)
set +o xtrace
source $TOP_DIR/lib/neutron_plugins/ovs_base
@ -132,4 +132,4 @@ function neutron_plugin_check_adv_test_requirements {
}
# Restore xtrace
$OVSA_XTRACE
$_XTRACE_NEUTRON_OVSL2

View File

@ -4,7 +4,7 @@
# -------------------------------------
# Save trace setting
OVSB_XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON_OVS_BASE=$(set +o | grep xtrace)
set +o xtrace
OVS_BRIDGE=${OVS_BRIDGE:-br-int}
@ -114,4 +114,4 @@ function _neutron_ovs_base_configure_nova_vif_driver {
}
# Restore xtrace
$OVSB_XTRACE
$_XTRACE_NEUTRON_OVS_BASE

View File

@ -4,7 +4,7 @@
# ---------------------------
# Save trace setting
FW_XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON_FIREWALL=$(set +o | grep xtrace)
set +o xtrace
FWAAS_PLUGIN=neutron_fwaas.services.firewall.fwaas_plugin.FirewallPlugin
@ -26,4 +26,4 @@ function neutron_fwaas_stop {
}
# Restore xtrace
$FW_XTRACE
$_XTRACE_NEUTRON_FIREWALL

View File

@ -4,7 +4,7 @@
# ---------------------------
# Save trace setting
LB_XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON_LB=$(set +o | grep xtrace)
set +o xtrace
@ -48,4 +48,4 @@ function neutron_lbaas_stop {
}
# Restore xtrace
$LB_XTRACE
$_XTRACE_NEUTRON_LB

View File

@ -4,7 +4,7 @@
# ---------------------------
# Save trace setting
METER_XTRACE=$(set +o | grep xtrace)
_XTRACE_NETURON_METER=$(set +o | grep xtrace)
set +o xtrace
@ -29,4 +29,5 @@ function neutron_metering_stop {
}
# Restore xtrace
$METER_XTRACE
$_XTRACE_NETURON_METER

View File

@ -4,7 +4,7 @@
# ---------------------------
# Save trace setting
VPN_XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON_VPN=$(set +o | grep xtrace)
set +o xtrace
@ -53,4 +53,4 @@ function neutron_vpn_stop {
}
# Restore xtrace
$VPN_XTRACE
$_XTRACE_NEUTRON_VPN

View File

@ -4,7 +4,7 @@
# ------------------------------------------
# Save trace setting
BS3_XTRACE=$(set +o | grep xtrace)
_XTRACE_NEUTRON_BIGSWITCH=$(set +o | grep xtrace)
set +o xtrace
BS_FL_CONTROLLERS_PORT=${BS_FL_CONTROLLERS_PORT:-localhost:80}
@ -51,4 +51,4 @@ function check_bigswitch_floodlight {
}
# Restore xtrace
$BS3_XTRACE
$_XTRACE_NEUTRON_BIGSWITCH

View File

@ -25,7 +25,7 @@
# - cleanup_nova
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_LIB_NOVA=$(set +o | grep xtrace)
set +o xtrace
@ -958,7 +958,7 @@ function stop_nova {
# Restore xtrace
$XTRACE
$_XTRACE_LIB_NOVA
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -8,7 +8,7 @@
# ``STACK_USER`` has to be defined
# Save trace setting
LV_XTRACE=$(set +o | grep xtrace)
_XTRACE_NOVA_FN_LIBVIRT=$(set +o | grep xtrace)
set +o xtrace
# Defaults
@ -134,7 +134,7 @@ EOF
# Restore xtrace
$LV_XTRACE
$_XTRACE_NOVA_FN_LIBVIRT
# Local variables:
# mode: shell-script

View File

@ -17,7 +17,7 @@
# cleanup_nova_hypervisor - remove transient data and cache
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_VIRTFAKE=$(set +o | grep xtrace)
set +o xtrace
@ -72,7 +72,7 @@ function stop_nova_hypervisor {
# Restore xtrace
$MY_XTRACE
$_XTRACE_VIRTFAKE
# Local variables:
# mode: shell-script

View File

@ -17,7 +17,7 @@
# cleanup_nova_hypervisor - remove transient data and cache
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_HYP_IRONIC=$(set +o | grep xtrace)
set +o xtrace
source $TOP_DIR/lib/nova_plugins/functions-libvirt
@ -81,7 +81,7 @@ function stop_nova_hypervisor {
# Restore xtrace
$MY_XTRACE
$_XTRACE_HYP_IRONIC
# Local variables:
# mode: shell-script

View File

@ -17,7 +17,7 @@
# cleanup_nova_hypervisor - remove transient data and cache
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_NOVA_LIBVIRT=$(set +o | grep xtrace)
set +o xtrace
source $TOP_DIR/lib/nova_plugins/functions-libvirt
@ -105,7 +105,7 @@ function stop_nova_hypervisor {
# Restore xtrace
$MY_XTRACE
$_XTRACE_NOVA_LIBVIRT
# Local variables:
# mode: shell-script

View File

@ -17,7 +17,7 @@
# cleanup_nova_hypervisor - remove transient data and cache
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_OPENVZ=$(set +o | grep xtrace)
set +o xtrace
@ -62,7 +62,7 @@ function stop_nova_hypervisor {
# Restore xtrace
$MY_XTRACE
$_XTRACE_OPENVZ
# Local variables:
# mode: shell-script

View File

@ -17,7 +17,7 @@
# cleanup_nova_hypervisor - remove transient data and cache
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_NOVA_VSPHERE=$(set +o | grep xtrace)
set +o xtrace
@ -64,7 +64,7 @@ function stop_nova_hypervisor {
# Restore xtrace
$MY_XTRACE
$_XTRACE_NOVA_VSPHERE
# Local variables:
# mode: shell-script

View File

@ -17,7 +17,7 @@
# cleanup_nova_hypervisor - remove transient data and cache
# Save trace setting
MY_XTRACE=$(set +o | grep xtrace)
_XTRACE_XENSERVER=$(set +o | grep xtrace)
set +o xtrace
@ -111,7 +111,7 @@ function stop_nova_hypervisor {
# Restore xtrace
$MY_XTRACE
$_XTRACE_XENSERVER
# Local variables:
# mode: shell-script

View File

@ -16,7 +16,7 @@
# - install_oslo
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_LIB_OSLO=$(set +o | grep xtrace)
set +o xtrace
@ -95,7 +95,7 @@ function install_oslo {
}
# Restore xtrace
$XTRACE
$_XTRACE_LIB_OSLO
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -21,7 +21,7 @@
# of this file which is a standard interface.
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_RPC_BACKEND=$(set +o | grep xtrace)
set +o xtrace
# Functions
@ -141,7 +141,7 @@ function rabbit_setuser {
}
# Restore xtrace
$XTRACE
$_XTRACE_RPC_BACKEND
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -24,7 +24,7 @@
# - _cleanup_swift_apache_wsgi
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_LIB_SWIFT=$(set +o | grep xtrace)
set +o xtrace
@ -823,7 +823,7 @@ function swift_configure_tempurls {
}
# Restore xtrace
$XTRACE
$_XTRACE_LIB_SWIFT
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -38,7 +38,7 @@
# - init_tempest
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_TEMPEST=$(set +o | grep xtrace)
set +o xtrace
@ -649,7 +649,7 @@ function init_tempest {
}
# Restore xtrace
$XTRACE
$_XTRACE_TEMPEST
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -21,7 +21,7 @@
# - cleanup_XXXX
# Save trace setting
XTRACE=$(set +o | grep xtrace)
_XTRACE_TEMPLATE=$(set +o | grep xtrace)
set +o xtrace
@ -92,7 +92,7 @@ function stop_XXXX {
}
# Restore xtrace
$XTRACE
$_XTRACE_TEMPLATE
# Tell emacs to use shell-script-mode
## Local variables:

View File

@ -573,7 +573,8 @@ run_phase source
# Generic helper to configure passwords
function read_password {
XTRACE=$(set +o | grep xtrace)
local xtrace
xtrace=$(set +o | grep xtrace)
set +o xtrace
var=$1; msg=$2
pw=${!var}
@ -616,7 +617,9 @@ function read_password {
eval "$var=$pw"
echo "$var=$pw" >> $localrc
fi
$XTRACE
# restore previous xtrace value
$xtrace
}