openvswitch with ifupdown after reboot

Bug #1770706 reported by Artem Gromov
This bug report is a duplicate of:  Bug #1813371: OVS 2.9+ systemd integration issues. Edit Remove
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
openvswitch (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Recently I needed to install OVS on fresh ubuntu 18.04.

1). # lsb_release -rd
Description: Ubuntu 18.04 LTS
Release: 18.04

2). # apt-cache policy openvswitch-switch
openvswitch-switch:
  Installed: 2.9.0-0ubuntu1
  Candidate: 2.9.0-0ubuntu1
  Version table:
 *** 2.9.0-0ubuntu1 500
        500 http://ru.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

3). OVS configured after reboot.

4). OVS was not configured after reboot.

After this actions:

- remove netplan.io
- install ifupdown
- install openvswitch-switch
- add verified ovs related statements to /etc/network/interfaces
- reboot

I got this in journal:

мая 11 16:26:49 host2.lab.atlantis.ru ovs-vsctl[1328]: ovs|00002|db_ctl_base|ERR|unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
мая 11 16:26:49 host2.lab.atlantis.ru ovs-vsctl[1368]: ovs|00002|db_ctl_base|ERR|unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
мая 11 16:26:49 host2.lab.atlantis.ru ovs-vsctl[1392]: ovs|00002|db_ctl_base|ERR|unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
мая 11 16:26:49 host2.lab.atlantis.ru ovs-vsctl[1424]: ovs|00002|db_ctl_base|ERR|unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
мая 11 16:26:49 host2.lab.atlantis.ru systemd[1]: networking.service: Failed with result 'exit-code'.
мая 11 16:26:49 host2.lab.atlantis.ru systemd[1]: Failed to start Raise network interfaces.
мая 11 16:28:42 host2.lab.atlantis.ru ovs-vsctl[2041]: ovs|00002|db_ctl_base|ERR|no bridge named br0
мая 11 16:28:43 host2.lab.atlantis.ru ovs-vsctl[2091]: ovs|00002|db_ctl_base|ERR|no bridge named br0
мая 11 16:28:43 host2.lab.atlantis.ru ovs-vsctl[2137]: ovs|00002|db_ctl_base|ERR|no bridge named br0
мая 11 16:28:43 host2.lab.atlantis.ru systemd[1]: networking.service: Failed with result 'exit-code'.
мая 11 16:28:43 host2.lab.atlantis.ru systemd[1]: Failed to start Raise network interfaces.
мая 11 16:30:05 host2.lab.atlantis.ru ovs-vsctl[2243]: ovs|00002|db_ctl_base|ERR|no bridge named br0
мая 11 16:30:06 host2.lab.atlantis.ru ovs-vsctl[2293]: ovs|00002|db_ctl_base|ERR|no bridge named br0
мая 11 16:30:07 host2.lab.atlantis.ru ovs-vsctl[2339]: ovs|00002|db_ctl_base|ERR|no bridge named br0
мая 11 16:30:07 host2.lab.atlantis.ru systemd[1]: networking.service: Failed with result 'exit-code'.
мая 11 16:30:07 host2.lab.atlantis.ru systemd[1]: Failed to start Raise network interfaces.

Problem was fixed after the following changes to unit files:

# diff /lib/systemd/system/ovsdb-server.service /etc/systemd/system/ovsdb-server.service
4c4
< Before=network.target network.service
---
> Before=network.target networking.service

# diff /lib/systemd/system/ovs-vswitchd.service /etc/systemd/system/ovs-vswitchd.service
4c4
< Before=network.target network.service
---
> Before=network.target networking.service

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
affects: systemd (Ubuntu) → openvswitch (Ubuntu)
Revision history for this message
fabricat (fabricat) wrote :

This seems to have been fixed on version 2.11.0
https://git.launchpad.net/~ubuntu-server-dev/ubuntu/+source/openvswitch/commit/?id=7b4f5ecb46bf853d8c814f31b8ddb3444dd60289

Unfortunately, that version is not available for Ubuntu 18.04

Revision history for this message
John Torquato (jvtorq) wrote :

Would it be feasible to compile the source code for 2.11.0 or above in Bionic 18.04 environment?

Revision history for this message
John Torquato (jvtorq) wrote :

If compiling 2.11.0 or above in Bionic is not feasible, can the updated Focal-era service scripts be used for the Bionic?

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.