network won't come up when using ovs for core network

Bug #1841151 reported by Alexander G.
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openvswitch (Ubuntu)
New
Undecided
Unassigned

Bug Description

The Open vSwitch readme (/usr/share/doc/openvswitch-switch/README.Debian.gz) states:
-----
* Ideally, an admin should not add openvswitch bridges in the 'auto'
section of the 'interfaces' file. This is because, when ifupdown starts
working on bridges listed in 'auto', openvswitch has not yet started.

But, if the admin wants to go down this route and adds openvswitch bridges
in the 'auto' section, openvswitch-switch will forcefully be started when
ifupdown kicks in. In a case like this, the admin needs to make sure that /usr
has already been mounted and that a remote $syslog (if used) is ready to
receive openvswitch logs.
-----

But this is exactly what we do. In this case /usr/share/openvswitch/scripts/ifupdown.sh is supposed to bring up the ovs daemons.

/usr/share/openvswitch/scripts/ifupdown.sh contains the following section:
-----
SERVICE_UNIT=/usr/lib/systemd/system/openvswitch-nonetwork.service
if [ -f $SERVICE_UNIT ] && [ -x /usr/bin/systemctl ]; then
    if ! systemctl --quiet is-active openvswitch-nonetwork.service; then
        systemctl start openvswitch-nonetwork.service
    fi
else
    if service openvswitch-switch status > /dev/null 2>&1; then
        service openvswitch-switch start
    fi
fi
-----

The networks comes up if I altering this section to:
-----
SERVICE_UNIT=/lib/systemd/system/openvswitch-switch.service
if [ -f $SERVICE_UNIT ] && [ -x /bin/systemctl ]; then
    if ! systemctl --quiet is-active openvswitch-switch.service; then
        systemctl start openvswitch-switch.service
    fi
else
    if service openvswitch-switch status > /dev/null 2>&1; then
        service openvswitch-switch start
    fi
fi
-----
Note that I fixed the paths and substituted nonetwork for switch here.

This files was fixed in the past already for an older version of ovs (see https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1731916). Seems like the patch wasn't adapted for the ovs version I use.

Facts about the system:

# lsb_release -rd
Description: Ubuntu 16.04.5 LTS
Release: 16.04

# apt-cache policy openvswitch-switch
openvswitch-switch:
  Installed: 2.9.2-0ubuntu0.18.04.3~cloud0
  Candidate: 2.9.2-0ubuntu0.18.04.3~cloud0
  Version table:
 *** 2.9.2-0ubuntu0.18.04.3~cloud0 500
        500 http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/queens/main amd64 Packages
        100 /var/lib/dpkg/status
     2.6.1-1cloudandheat0.1~cloud0 500
        500 ssh://freight-repo.cloudandheat.com/var/cache/freight xenial-stable/main amd64 Packages
     2.5.5-0ubuntu0.16.04.2 500
        500 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://de.archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     2.5.2-1cloudandheat0.1 500
        500 ssh://freight-repo.cloudandheat.com/var/cache/freight xenial-stable/main amd64 Packages
     2.5.0-0ubuntu1 500
        500 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial/main amd64 Packages

Tags: patch
Revision history for this message
Alexander G. (alegra) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch for ovs ifupdown.sh script" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
James Page (james-page) wrote :

I'm pretty sure this is a duplicate of bug 1731916 as the paths for the systemd unit and systemctl are incorrect.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.