[Bug 1314887] Re: ifupdown hook is missing in upstart script
Mathew Hodson
mathew.hodson at gmail.com
Thu Dec 10 02:02:22 UTC 2015
** Description changed:
- ifupdown hook is present in /etc/init.d/openvswitch-switch, but not in
- /etc/init/openvswitch-switch.conf which is the default.
+ [Impact]
- === modified file 'debian/openvswitch-switch.upstart'
- --- debian/openvswitch-switch.upstart 2013-08-23 11:18:52 +0000
- +++ debian/openvswitch-switch.upstart 2014-05-01 04:26:00 +0000
- @@ -32,11 +32,13 @@
- fi
- set "$@" $OVS_CTL_OPTS
- "$@"
- + ifup --allow ovs `ifquery --allow ovs --list`
- end script
+ The documentation included in both upstream Open vSwitch (ovs) 2.0.2 and
+ the version distributed by Ubuntu states that it supports configuring
+ ovs using /etc/network/interfaces (see /usr/share/doc/openvswitch-
+ switch/README.Debian). Moreover, /etc/init.d/openvswitch-switch contains
+ the necessary logic to support parsing /etc/network/interfaces but that
+ logic is completely missing in the Upstart /etc/init/openvswitch-
+ switch.conf script.
- post-stop script
- . /usr/share/openvswitch/scripts/ovs-lib
- test -e /etc/default/openvswitch-switch && . /etc/default/openvswitch-switch
+ The result of this issue is a user can properly configure their network
+ in /etc/network/interfaces, test it with ifup/ifdown, reboot, and have
+ no network configured with the machine comes back up. If the user is
+ unaware that Upstart is being used and not classic init.d scripts, a
+ manual call using /etc/init.d/openvswitch-switch works as expected.
+ Without boot integration, users can't easily use Open vSwitch to
+ configure their "main" interface and have a system work on boot.
- + ifdown --allow ovs `ifquery --allow ovs --list`
- ovs_ctl stop
- end script
+ The fix in this thread basically adds support for using the normal
+ config files (/etc/network/interfaces and /etc/network/interfaces.d/*)
+ to configure the network on boot.
+
+ [Test Case]
+
+ After running `apt-get install -y openvswitch-switch`, add a stanza to
+ /etc/network/interfaces like the following:
+
+ allow-ovs br0
+ iface br0 inet static
+ ovs_type OVSBridge
+ address 172.16.0.1
+ network 255.255.255.0
+
+ Try `ifup br0` and `ifdown br0` and notice how the interface is
+ correctly controlled. Try `/etc/init.d/openvswitch-switch restart` and
+ note how the interface comes up. Reboot the machine and note how br0 is
+ not correctly configured.
+
+ [Regression Potential]
+
+ This problem is recognized by the user community (see
+ http://www.opencloudblog.com/?p=240,
+ http://blog.scottlowe.org/2012/08/17/installing-kvm-and-open-vswitch-on-
+ ubuntu/, etc) and people have been manually patching their systems for
+ years to get the desired capability. It's conceivable people's odd ways
+ of fixing this problem could conflict with the potential patch. Double
+ ifup'ing or ifdown'ing an interface shouldn't break any systems but
+ error messages may be emitted.
+
+ The other unlikely issue is that users have interfaces correctly
+ configured in /etc/network/interfaces and are deliberately depending on
+ the interfaces *not* coming up on boot. This patch would cause these
+ boot-dormant interfaces to come up unexpectedly but, again, I think this
+ problem unlikely.
+
+ [Other Info]
+
+ This patch aligns the boot behavior both with what's expected and what
+ the documentation states.
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to openvswitch in Ubuntu.
https://bugs.launchpad.net/bugs/1314887
Title:
ifupdown hook is missing in upstart script
Status in openvswitch package in Ubuntu:
Fix Released
Status in openvswitch source package in Trusty:
Fix Committed
Bug description:
[Impact]
The documentation included in both upstream Open vSwitch (ovs) 2.0.2
and the version distributed by Ubuntu states that it supports
configuring ovs using /etc/network/interfaces (see /usr/share/doc
/openvswitch-switch/README.Debian). Moreover, /etc/init.d/openvswitch-
switch contains the necessary logic to support parsing
/etc/network/interfaces but that logic is completely missing in the
Upstart /etc/init/openvswitch-switch.conf script.
The result of this issue is a user can properly configure their
network in /etc/network/interfaces, test it with ifup/ifdown, reboot,
and have no network configured with the machine comes back up. If the
user is unaware that Upstart is being used and not classic init.d
scripts, a manual call using /etc/init.d/openvswitch-switch works as
expected. Without boot integration, users can't easily use Open
vSwitch to configure their "main" interface and have a system work on
boot.
The fix in this thread basically adds support for using the normal
config files (/etc/network/interfaces and /etc/network/interfaces.d/*)
to configure the network on boot.
[Test Case]
After running `apt-get install -y openvswitch-switch`, add a stanza to
/etc/network/interfaces like the following:
allow-ovs br0
iface br0 inet static
ovs_type OVSBridge
address 172.16.0.1
network 255.255.255.0
Try `ifup br0` and `ifdown br0` and notice how the interface is
correctly controlled. Try `/etc/init.d/openvswitch-switch restart` and
note how the interface comes up. Reboot the machine and note how br0
is not correctly configured.
[Regression Potential]
This problem is recognized by the user community (see
http://www.opencloudblog.com/?p=240,
http://blog.scottlowe.org/2012/08/17/installing-kvm-and-open-vswitch-
on-ubuntu/, etc) and people have been manually patching their systems
for years to get the desired capability. It's conceivable people's odd
ways of fixing this problem could conflict with the potential patch.
Double ifup'ing or ifdown'ing an interface shouldn't break any systems
but error messages may be emitted.
The other unlikely issue is that users have interfaces correctly
configured in /etc/network/interfaces and are deliberately depending
on the interfaces *not* coming up on boot. This patch would cause
these boot-dormant interfaces to come up unexpectedly but, again, I
think this problem unlikely.
[Other Info]
This patch aligns the boot behavior both with what's expected and what
the documentation states.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1314887/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list