openvswitch based interfaces not started in time during boot

Bug #1084028 reported by Stefan Kooman on 2012-11-28
108
This bug affects 19 people
Affects Status Importance Assigned to Milestone
openvswitch (Ubuntu)
High
James Page

Bug Description

If you create network interfaces (access ports) in openvswitch, and configure them in /etc/network/interfaces, failsafe.conf will kick in and the interfaces get configured after failsafe.conf exits. This adds two minutes to boot time.

openvswitch config:

ovs-vsctl show
93e6b401-214b-4089-ac51-27ca43009cce
    Bridge "br0"
        Port "br0"
            Interface "br0"
                type: internal
        Port "vlan128"
            tag: 128
            Interface "vlan128"
                type: internal
        Port "bond0"
            trunks: [128]
            Interface "eth0"
            Interface "eth5"
    Bridge "br1"
        Port "bond1"
            trunks: [143, 145]
            Interface "eth1"
            Interface "eth4"
        Port "phy-br1"
            Interface "phy-br1"
        Port "br1"
            Interface "br1"
                type: internal
        Port "int-br1"
            Interface "int-br1"
    ovs_version: "1.4.3"

cat /etc/network/interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
      pre-up ip link set $IFACE up
      post-down ip link set $IFACE down

auto eth1
iface eth1 inet manual
      pre-up ip link set $IFACE up
      post-down ip link set $IFACE down

auto eth4
iface eth4 inet manual
      pre-up ip link set $IFACE up
      post-down ip link set $IFACE down

auto eth5
iface eth5 inet manual
      pre-up ip link set $IFACE up
      post-down ip link set $IFACE down

auto vlan128
iface vlan128 inet static
    address 172.17.128.102
    netmask 255.255.255.0

I expected openvswitch (interfaces/ports/bonds/trunks) to be up-and-running before /etc/network/interfaces gets evaluated.

Clint Byrum (Ubuntu) reported me the following:

 "failsafe.conf will exit when all interfaces marked as 'auto' are "up". The
only time you get a 2 minute delay is when it takes that long to bring those
interfaces up. Since you have these vlanXXX interfaces listed, the system
is waiting for them to come up.

It seems to me that openvswitch needs to be brought up before runlevel 2, and
so probably needs an upstart job. This sounds like a clear bug."

Serge Hallyn (serge-hallyn) wrote :

I'm not confident enough to mark it Confirmed, but I believe that's right - an upstart job is needed.

Changed in openvswitch (Ubuntu):
importance: Undecided → High
Changed in openvswitch (Ubuntu):
status: New → Confirmed
Saul St. John (saul-stjohn) wrote :

This bug also prevents starting some services (e.g. isc-dhcp-server) on openvswitch interfaces at boot.

I avoided the problem by changing /etc/network/interfaces such that ovs interfaces don't come up automatically, and ifupping them manually in /etc/rc.local instead... but that's pretty silly.

marcond@gmail.com (marcond) wrote :

I am doing some research regarding this issue and found a proposal for Open vSwitch upstart script:

https://github.com/gdahlm/openvswitch/blob/ubuntu/debian/openvswitch.upstart

The discussion about this is located at http://openvswitch.org/pipermail/dev/2012-May/017010.html

So far, I've applied this upstart script on a test system running Open vSwitch 1.7.3 and it seems to work ok:

$ wget https://github.com/gdahlm/openvswitch/raw/ubuntu/debian/openvswitch.upstart
$ sudo mv openvswitch.upstart /etc/init/openvswitch.conf

Further research is needed to determine whether it's fully compatible with current Open vSwitch release.

James Page (james-page) on 2013-05-15
Changed in openvswitch (Ubuntu Saucy):
assignee: nobody → James Page (james-page)
status: Confirmed → In Progress
milestone: none → ubuntu-13.05
Endre Karlson (endre-karlson) wrote :

I can confirm this bug.

James Page (james-page) wrote :

Attaching the upstart configuration I'm proposing to upload to saucy once I get 3.9 kernel compat sorted out for the DKMS packages.

James Page (james-page) wrote :

Pushing the milestone for this bug out a bit; the init script does alot more that just start/stop openvswitch so needs more careful consideration.

Changed in openvswitch (Ubuntu Saucy):
milestone: ubuntu-13.05 → ubuntu-13.07

@james-page We're testing your upstart openvswitch-switch.conf file on Precise. It's looking good so far. Can this bug be marked as relevant for Precise too, please? Once it's in Saucy we'd definitely like to see it backported to Precise.

James Page (james-page) on 2013-08-16
Changed in openvswitch (Ubuntu Saucy):
status: In Progress → Triaged
no longer affects: openvswitch (Ubuntu Saucy)
Matteo Panella (mpanella) wrote :

I second @jesse-pretorius' request: the upstart job definitely needs to be backported to Precise once it hits Saucy

James Page (james-page) wrote :

@Jesse & Matteo

I'm not comfortable backporting this to the version in 12.04 - however, I can offer a compromise.

OpenvSwitch 1.10 will be included in the Cloud Archive for OpenStack Havana on 12.04 and would include this fix (assuming I can get in enough testing this week to satisfy myself that its OK).

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openvswitch - 1.10.1+git20130823-0ubuntu2

---------------
openvswitch (1.10.1+git20130823-0ubuntu2) saucy; urgency=low

  * Fully support transitions from openvswitch module in 3.11 kernel to
    DKMS module:
    - d/openvswitch-switch.openvswitch-force-reload-mod.upstart: Drop the
      gre module when force reloading to make transitions from native kernel
      module to dkms module work.
    - d/NEWS: Drop information about DKMS/kernel compatibility with GRE
      tunnels.
 -- James Page <email address hidden> Sat, 24 Aug 2013 09:41:02 +0100

Changed in openvswitch (Ubuntu):
status: Triaged → Fix Released
gadLinux (gad-aguilardelgado) wrote :

You should reopen it since it happens in trusty tahr to me.

Someone can try it in this version of ubuntu, please?

gadLinux (gad-aguilardelgado) wrote :

root@red-compute:~# ovs-vsctl show
8d08d8e4-49f2-4243-b1db-7641984a8530
    Bridge br-ex
        Port br-ex
            Interface br-ex
                type: internal
    Bridge br-int
        Port "eth1"
            Interface "eth1"
        Port br-int
            Interface br-int
                type: internal
    ovs_version: "2.0.1"

root@red-compute:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet manual
 up ifconfig $IFACE 0.0.0.0 up
        up ip link set $IFACE promisc on
        down ip link set $IFACE promisc off
        down ifconfig $IFACE down

auto eth1
iface eth1 inet manual
 up ifconfig $IFACE 0.0.0.0 up
        down ifconfig $IFACE down

auto br-int
iface br-int inet dhcp

And when I boot up, cloudinit does not find the interfaces so no network is up.

I have to take an screenshot of the issue. The problem is that rbd storage is not boot up because cloudinit does not find the interfaces to connect to the intranet (because it's a bridge), and all the system becomes a nightmare.

gadLinux (gad-aguilardelgado) wrote :

I will open another bug... sorry

Kindjal (kindjal) wrote :

I still see this bug in openstack kilo on ubuntu trusty.

Max Krasilnikov (pseudo) wrote :

Mee too. Ubuntu 14.04 + Openstack Kilo. Br-eth1 is not starting on system boot but if I do `ifup br-eth1` all things are doing well.
# grep -vE "(^#|^$)" /etc/network/interfaces.d/ovs-bridge.cfg
iface eth0 inet manual
iface eth1 inet manual
auto br-eth1
allow-ovs br-eth1
iface br-eth1 inet static
        address 10.0.64.67/24
        gateway 10.0.64.64
        ovs_type OVSBridge
        ovs_ports bond1
allow-br-eth1 bond1
iface bond1 inet manual
        ovs_bridge br-eth1
        ovs_type OVSBond
        ovs_bonds eth0 eth1
        ovs_options bond_mode=balance-slb lacp=active

Oleg Borisenko (al-foo) wrote :

I have the same bug too

Oleg Borisenko (al-foo) wrote :

* Ubuntu 14.04.4 + Openstack Liberty

Michael Polenchuk (mpolenchuk) wrote :

confirmed this bug on ubuntu 14.04.5 (ovs 2.5.9, openstack mitaka):
### ifcfg-br-mesh ###
auto br-mesh
allow-ovs br-mesh
iface br-mesh inet static
ovs_type OVSBridge
ovs_ports ens5
address 192.168.2.4/24
ovs_extra set Bridge br-mesh datapath_type=netdev

### ifcfg-ens5 ###
allow-br-mesh ens5
iface ens5 inet manual
ovs_type DPDKOVSPort
ovs_bridge br-mesh
dpdk_port dpdk0

Waldek Koźba (waldek.kozba) wrote :

Ubuntu 14.04.5 (Open vSwitch) 2.0.2 (installed with apt install openvswitch-switch)

Following configuration works for me, also after reboot:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-br-ex eth0
iface eth0 inet manual
ovs_type OVSPort
ovs_bridge br-ex

# The OVS bridge interface
auto br-ex
allow-ovs br-ex
iface br-ex inet static
ovs_type OVSBridge
ovs_ports eth0
address 172.24.6.11
netmask 255.255.255.0
gateway 172.24.6.1
dns-nameservers 8.8.8.8

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers