[prev in list] [next in list] [prev in thread] [next in thread]
List: openvswitch-discuss
Subject: [ovs-discuss] ifup-ovs not configuring bridge devices at boot
From: fbl () redhat ! com (Flavio Leitner)
Date: 2014-05-24 19:55:10
Message-ID: 20140524195510.GJ2498 () t520 ! home
[Download RAW message or body]
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 <lars at redhat.com> | larsks @ irc
> Cloud Engineering / OpenStack | " " @ twitter
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://openvswitch.org/pipermail/discuss/attachments/20140524/9cb01e41/attachment.sig>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic