Cannot find device br-ex fix for openvswitch on openstack

Cannot find device br-ex fix for openvswitch on openstack

Cannot find device br-ex fix for openvswitch on openstack

During the installation of OpenStack on Debian Wheezy I noticed an unusual Behave. While booting up the networking task Debian complained about: Cannot find device br-ex. In this shortie i will give you an solution for that.


Since the upstart scripts are very susceptible in timing on Debian i tought myself why not start openvswitch before the networking script is loading?

So this is what we do now!

Prerequisites:

  • editor: your preferred one
  • insserv for enabling new init script
  • init script config tool: update-rc.d

Network interfaces like described in Openstack tutorial:

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 192.168.1.1
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255

auto eth1
iface eth1 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 br-ex
iface br-ex inet static
        address 1.2.3.2
        netmask 255.255.255.0
        network 1.2.3.0
        broadcast 1.2.4.254
        gateway 1.2.3.1
        dns-nameservers 8.8.8.8
        dns-search your.name

First of all we need to smash out the old LSB symlinks:

update-rc.d -f openvswitch-switch remove

make sure that the symlinks are gone by entering:

ls /etc/rc[0-9].d/*openvswitch-switch

if everything is clean do backup the original script:

cp /etc/init.d/openvswitch-switch /etc/init.d/openvswitch-switch.orig

Now here comes the magic:

The original LSB header part of openvswitch-switch looks like this:

### BEGIN INIT INFO
# Provides:          openvswitch-switch
# Required-Start:    $network $named $remote_fs $syslog
# Required-Stop:     $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Open vSwitch switch
### END INIT INFO

But we want to look it like this:

### BEGIN INIT INFO
# Provides:          openvswitch-switch
# Required-Start:    mountkernfs $local_fs urandom
# Required-Stop:     $local_fs
# X-Start-Before:    networking
# Default-Start:     S
# Default-Stop:      0 6
# Short-Description: Open vSwitch switch
### END INIT INFO

after you have edited openvswitch-switch and saved the changes you finally have to run update-rc.d again to get the symlinks corrected.

Enable it by running command:

insserv openvswitch-switch

and check if /etc/rcS.d/*openvswitch-switch exists.

You are ready to reboot now and check the results.

Happy fixing!

One thought on “Cannot find device br-ex fix for openvswitch on openstack”

  1. Thank you very much Jules!

    This solve the same issue I was facing on Debian Jessie. The modification proposed to LSB header part of openvswitch-switch works fine, although jessie is using systemd

    An additional modification is needed in my case in /etc/network/interfaces:

    auto br-ex
    iface br-ex inet static
    address ...
    netmask ...
    up ifconfig eth0 up
    up ip link set eth0 promisc on
    down ip link set eth0 promisc off
    down ifconfig eth0 down

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.