On Sat, May 24, 2014 at 08:35:59AM -0400, Lars Kellogg-Stedman wrote:
> I spent some time earlier this week tracking down a problem I've
> experienced under both Fedora 19 and 20: upon a reboot, br-ex would
> not be configured with an ip address despite a valid configuration in
> /etc/sysconfig/network-scripts/ifcfg-br-ex. I've seen a few other
> people report this problem as well.
>
> It turns out this was due to the following logic in ifup-ovs:
>
> if check_device_down "${DEVICE}"; then
> ovs-vsctl -t ${TIMEOUT} -- --may-exist add-br "$DEVICE" $OVS_OPTIO
> ${OVS_EXTRA+-- $OVS_EXTRA} \
> ${STP+-- set bridge "$DEVICE" stp_enable="${STP}"}
> else
> OVSBRIDGECONFIGURED="yes"
> fi
>
> The call to check_device_down was always returning false, setting
> OVSBRIDGECONFIGURED=yes, so the call to ifup-eth later in the script
> never happens:
>
> # When dhcp is not enabled, it is possible that someone may want
> # a standalone bridge (i.e it may not have any ports). Configure it.
> if [ "${OVSBOOTPROTO}" != "dhcp" ] && [ -z "${OVSINTF}" ] && \
> [ "${OVSBRIDGECONFIGURED}" != "yes" ]; then
> ${OTHERSCRIPT} ${CONFIG}
> fi
>
> I think this is happening because OVS devices are persistent, so when the
> system starts up ovs, br-ex is (a) created and (b) has the link state
> set to "up".Exactly, it's a known issue. There is no way to tell if the interface was brought up by the admin or by the initialization scripts. There is a patch fixing this and a discussion that you might be interested in: http://openvswitch.org/pipermail/dev/2014-April/038619.html fbl > > I've fixed this locally by simply removing the "else" component of > that first if statement, so that it looks like: > > if check_device_down "${DEVICE}"; then > ovs-vsctl -t ${TIMEOUT} -- --may-exist add-br "$DEVICE" $OVS_OPTIO > ${OVS_EXTRA+-- $OVS_EXTRA} \ > ${STP+-- set bridge "$DEVICE" stp_enable="${STP}"} > fi > > Does that seem reasonable? The only consequence of this is that > $OTHERSCRIPT will be called every time one runs "ifup > <bridge-device>". > > Also, just to be explicit, this is only a problem with "standalone" > bridges -- bridge devices that don't have any ports configured through > ifcfg-... scripts. > > Cheers, > > -- > Lars Kellogg-Stedman <[email protected]> | larsks @ irc > Cloud Engineering / OpenStack | " " @ twitter >
pgpYzhn5M9oI4.pgp
Description: PGP signature
_______________________________________________ discuss mailing list [email protected] http://openvswitch.org/mailman/listinfo/discuss
