[Bug 1731916] Re: ifupdown integration does not start ovs daemon

Ubuntu Foundations Team Bug Bot 1731916 at bugs.launchpad.net
Fri Apr 6 20:24:13 UTC 2018


The attachment "bug-1731916-ifupdown.patch" 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

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to openvswitch in Ubuntu.
https://bugs.launchpad.net/bugs/1731916

Title:
  ifupdown integration does not start ovs daemon

Status in openvswitch package in Ubuntu:
  Confirmed

Bug description:
  The debian/ifupdown.sh of openvswitch*.debian.tar.xz contains:

  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

  However, on a fresh xenial, the files which the first if branch checks
  for are located at an entirely different place:

  vagrant at m1r1:~$ stat /bin/systemctl
    File: '/bin/systemctl'
    Size: 659848    	Blocks: 1296       IO Block: 4096   regular file
  Device: fd01h/64769d	Inode: 655454      Links: 1
  Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
  Access: 2017-11-13 10:08:37.460000000 +0000
  Modify: 2017-07-18 23:56:57.000000000 +0000
  Change: 2017-10-15 18:32:47.985047000 +0000
   Birth: -
  vagrant at m1r1:~$ stat /lib/systemd/system/openvswitch-nonetwork.service 
    File: '/lib/systemd/system/openvswitch-nonetwork.service'
    Size: 359       	Blocks: 8          IO Block: 4096   regular file
  Device: fd01h/64769d	Inode: 934190      Links: 1
  Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
  Access: 2017-11-13 10:38:04.758113095 +0000
  Modify: 2017-03-15 12:34:41.000000000 +0000
  Change: 2017-11-13 10:38:02.355000434 +0000
   Birth: -
  vagrant at m1r1:~$ sudo stat /usr/bin/systemctl
  stat: cannot stat '/usr/bin/systemctl': No such file or directory
  vagrant at m1r1:~$ sudo stat /usr/lib/systemd/system
  stat: cannot stat '/usr/lib/systemd/system': No such file or directory

  This leads the ifupdown.sh to take the second branch, but that has a
  different issue:

  vagrant at m1r1:~$ service openvswitch-switch status > /dev/null || echo false
  false
  vagrant at m1r1:~$ sudo systemctl start openvswitch-switch
  vagrant at m1r1:~$ service openvswitch-switch status > /dev/null && echo true
  true

  That is, the return code appears to be reversed (at least for systems
  running systemd).

  
  This means that interfaces(5) cannot be used with OpenvSwitch and `auto` at all, because openvswitch isn’t started automatically.

  
  I think the paths should be fixed (the correct paths are above).

  $ lsb_release -rd
  Description:	Ubuntu 16.04.3 LTS
  Release:	16.04
  # apt-cache policy openvswitch-switch
  openvswitch-switch:
    Installed: (none)
    Candidate: 2.5.2-0ubuntu0.16.04.3
    Version table:
       2.5.2-0ubuntu0.16.04.3 500
          500 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
          500 http://security.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
       2.5.2-0ubuntu0.16.04.2 500
          500 http://de.archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
          500 http://security.ubuntu.com/ubuntu xenial-security/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

  
  Expected behaviour: using `auto` with an OpenvSwitch thing in /etc/network/interfaces should start openvswitch if it isn’t running.

  Actual behaviour: Openvswitch is not started and the interfaces do not
  come up.

  Note: changing the paths as suggested above fixes the issue for me.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1731916/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list