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
55 lines
1.3 KiB
Bash
55 lines
1.3 KiB
Bash
#!/bin/bash
|
|
#
|
|
# Big Switch/FloodLight OpenFlow Controller
|
|
# ------------------------------------------
|
|
|
|
# Save trace setting
|
|
_XTRACE_NEUTRON_BIGSWITCH=$(set +o | grep xtrace)
|
|
set +o xtrace
|
|
|
|
BS_FL_CONTROLLERS_PORT=${BS_FL_CONTROLLERS_PORT:-localhost:80}
|
|
BS_FL_OF_PORT=${BS_FL_OF_PORT:-6633}
|
|
|
|
function configure_bigswitch_floodlight {
|
|
:
|
|
}
|
|
|
|
function init_bigswitch_floodlight {
|
|
install_neutron_agent_packages
|
|
|
|
echo -n "Installing OVS managed by the openflow controllers:"
|
|
echo ${BS_FL_CONTROLLERS_PORT}
|
|
|
|
# Create local OVS bridge and configure it
|
|
sudo ovs-vsctl --no-wait -- --if-exists del-br ${OVS_BRIDGE}
|
|
sudo ovs-vsctl --no-wait add-br ${OVS_BRIDGE}
|
|
sudo ovs-vsctl --no-wait br-set-external-id ${OVS_BRIDGE} bridge-id ${OVS_BRIDGE}
|
|
|
|
ctrls=
|
|
for ctrl in `echo ${BS_FL_CONTROLLERS_PORT} | tr ',' ' '`; do
|
|
ctrl=${ctrl%:*}
|
|
ctrls="${ctrls} tcp:${ctrl}:${BS_FL_OF_PORT}"
|
|
done
|
|
echo "Adding Network conttrollers: " ${ctrls}
|
|
sudo ovs-vsctl --no-wait set-controller ${OVS_BRIDGE} ${ctrls}
|
|
}
|
|
|
|
function install_bigswitch_floodlight {
|
|
:
|
|
}
|
|
|
|
function start_bigswitch_floodlight {
|
|
:
|
|
}
|
|
|
|
function stop_bigswitch_floodlight {
|
|
:
|
|
}
|
|
|
|
function check_bigswitch_floodlight {
|
|
:
|
|
}
|
|
|
|
# Restore xtrace
|
|
$_XTRACE_NEUTRON_BIGSWITCH
|