[ovs-dev] adding bridge and setting stp in one step
Ben Pfaff
blp at nicira.com
Thu Mar 14 17:43:07 UTC 2013
Does something like the following make sense? It would eliminate an
ovs-vsctl call and keep ovs-vswitchd from not having STP enabled
briefly. I haven't tested it.
If it makes sense to you, are you willing to pick it up as a patch
yourself?
Thanks,
Ben.
diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs b/rhel/etc_sysconfig_network-scripts_ifup-ovs
index 27409e5..165d3c9 100755
--- a/rhel/etc_sysconfig_network-scripts_ifup-ovs
+++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs
@@ -74,7 +74,7 @@ case "$TYPE" in
if ovs_vsctl br-exists "${DEVICE}"; then
OVSBRIDGECONFIGURED="yes"
else
- ovs_vsctl add-br "$DEVICE" $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
+ ovs_vsctl add-br "$DEVICE" $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA} ${STP+-- set bridge "$DEVICE" stp_enable="${STP}"}
fi
if [ "${OVSBOOTPROTO}" = "dhcp" ] && [ -n "${OVSINTF}" ]; then
case " ${OVSDHCPINTERFACES} " in
@@ -87,8 +87,6 @@ case "$TYPE" in
[ "${OVSBRIDGECONFIGURED}" != "yes" ]; then
${OTHERSCRIPT} ${CONFIG}
fi
- [ -n "${STP}" ] && ovs-vsctl -t "${TIMEOUT}" --no-wait set bridge \
- "${DEVICE}" stp_enable="${STP}"
exit 0
;;
OVSPort)
More information about the dev
mailing list