Categories: OpenstackSolutions

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!

Jules

Jules is the owner and author of ISPIRE.ME. He's a Linux System Engineer, Tech fanatic and an Open Source fan.

View Comments

  • 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

Recent Posts

HTTP/2 SSL Offloading with Hitch and Varnish

HTTP/2 SSL Offloading with Hitch and Varnish Since Chrome browsers showing you insecure warning on…

7 years ago

File changed as we read it GlusterFS issue

File changed as we read it GlusterFS issue Recently i had trouble running Backups of…

8 years ago

Running multiple instances of varnish using systemd

Running multiple instances of varnish using systemd If you have not yet found a complete…

8 years ago

HTTP/2 SSL Offloading with Haproxy and Nginx

HTTP/2 SSL Offloading with Haproxy and Nginx After HTTP/2 becoming more an more prominent regarding SSL…

8 years ago

Get Real IP with Haproxy Tomcat Jira Confluence using x-forwarded-for

Get Real IP with Haproxy Tomcat Jira Confluence using x-forwarded-for Everyone knows the Problem. Get…

8 years ago

Review TDS2 How to backtest using tick data with Metatrader 4

Review TDS2 How to backtest using tick data with Metatrader 4 in this Review TDS2…

8 years ago

This website uses cookies.