Fix Neutron plugin XTRACE handling
The various Neutron plugin files need to have unique variables for the
xtrace state as they are sometimes nested more than two levels deep
and MY_XTRACE is getting stomped. This gives each of the neutron_plugin
and neutron_thirdparty include files a unique XTRACE state variable.
I don't think this is a problem with any of the other plugin include
files (yet) so this just handles Neutron for now.
Change-Id: I7c272a48e7974edecaff5f431ff7443dd6622588
diff --git a/lib/neutron_thirdparty/bigswitch_floodlight b/lib/neutron_thirdparty/bigswitch_floodlight
index f03de56..033731e 100644
--- a/lib/neutron_thirdparty/bigswitch_floodlight
+++ b/lib/neutron_thirdparty/bigswitch_floodlight
@@ -2,7 +2,7 @@
# ------------------------------------------
# Save trace setting
-MY_XTRACE=$(set +o | grep xtrace)
+BS3_XTRACE=$(set +o | grep xtrace)
set +o xtrace
BS_FL_CONTROLLERS_PORT=${BS_FL_CONTROLLERS_PORT:-localhost:80}
@@ -49,4 +49,4 @@
}
# Restore xtrace
-$MY_XTRACE
+$BS3_XTRACE
diff --git a/lib/neutron_thirdparty/midonet b/lib/neutron_thirdparty/midonet
index ad417bb..099a66e 100644
--- a/lib/neutron_thirdparty/midonet
+++ b/lib/neutron_thirdparty/midonet
@@ -17,7 +17,7 @@
MIDONET_CLIENT_DIR=${MIDONET_CLIENT_DIR:-$MIDONET_DIR/python-midonetclient}
# Save trace setting
-MY_XTRACE=$(set +o | grep xtrace)
+MN3_XTRACE=$(set +o | grep xtrace)
set +o xtrace
function configure_midonet {
@@ -46,4 +46,4 @@
}
# Restore xtrace
-$MY_XTRACE
+$MN3_XTRACE
diff --git a/lib/neutron_thirdparty/ryu b/lib/neutron_thirdparty/ryu
index b2c1b61..bbe227e 100644
--- a/lib/neutron_thirdparty/ryu
+++ b/lib/neutron_thirdparty/ryu
@@ -2,7 +2,7 @@
# -----------------------
# Save trace setting
-MY_XTRACE=$(set +o | grep xtrace)
+RYU3_XTRACE=$(set +o | grep xtrace)
set +o xtrace
@@ -75,4 +75,4 @@
}
# Restore xtrace
-$MY_XTRACE
+$RYU3_XTRACE
diff --git a/lib/neutron_thirdparty/trema b/lib/neutron_thirdparty/trema
index d465ac7..f829aa8 100644
--- a/lib/neutron_thirdparty/trema
+++ b/lib/neutron_thirdparty/trema
@@ -13,7 +13,7 @@
TREMA_APPS_BRANCH=${TREMA_APPS_BRANCH:-master}
# Save trace setting
-MY_XTRACE=$(set +o | grep xtrace)
+TREMA3_XTRACE=$(set +o | grep xtrace)
set +o xtrace
TREMA_DIR=${TREMA_DIR:-$DEST/trema}
@@ -114,4 +114,4 @@
}
# Restore xtrace
-$MY_XTRACE
+$TREMA3_XTRACE
diff --git a/lib/neutron_thirdparty/vmware_nsx b/lib/neutron_thirdparty/vmware_nsx
index 3fecc62..7a76570 100644
--- a/lib/neutron_thirdparty/vmware_nsx
+++ b/lib/neutron_thirdparty/vmware_nsx
@@ -11,7 +11,7 @@
# * NSX_GATEWAY_NETWORK_CIDR --> CIDR to configure br-ex, e.g. 172.24.4.211/24
# Save trace setting
-MY_XTRACE=$(set +o | grep xtrace)
+NSX3_XTRACE=$(set +o | grep xtrace)
set +o xtrace
# This is the interface that connects the Devstack instance
@@ -83,4 +83,4 @@
}
# Restore xtrace
-$MY_XTRACE
+$NSX3_XTRACE