ifupdown integration does not start ovs daemon
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openvswitch (Ubuntu) |
Fix Released
|
Low
|
James Page | ||
Xenial |
Triaged
|
Medium
|
Unassigned | ||
Bionic |
Triaged
|
Low
|
Unassigned | ||
Focal |
Triaged
|
Low
|
Unassigned | ||
Groovy |
Triaged
|
Low
|
Unassigned | ||
Hirsute |
Triaged
|
Low
|
Unassigned | ||
Impish |
Fix Released
|
Low
|
James Page |
Bug Description
The debian/ifupdown.sh of openvswitch*
SERVICE_
if [ -f $SERVICE_UNIT ] && [ -x /usr/bin/systemctl ]; then
if ! systemctl --quiet is-active openvswitch-
systemctl start openvswitch-
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@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@m1r1:~$ stat /lib/systemd/
File: '/lib/systemd/
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@m1r1:~$ sudo stat /usr/bin/systemctl
stat: cannot stat '/usr/bin/
vagrant@m1r1:~$ sudo stat /usr/lib/
stat: cannot stat '/usr/lib/
This leads the ifupdown.sh to take the second branch, but that has a different issue:
vagrant@m1r1:~$ service openvswitch-switch status > /dev/null || echo false
false
vagrant@m1r1:~$ sudo systemctl start openvswitch-switch
vagrant@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.
Version table:
2.
500 http://
500 http://
2.
500 http://
500 http://
2.5.0-0ubuntu1 500
500 http://
500 http://
Expected behaviour: using `auto` with an OpenvSwitch thing in /etc/network/
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.
Changed in openvswitch (Ubuntu): | |
status: | Confirmed → Triaged |
Changed in openvswitch (Ubuntu Impish): | |
importance: | Undecided → Low |
Changed in openvswitch (Ubuntu Hirsute): | |
importance: | Undecided → Low |
Changed in openvswitch (Ubuntu Groovy): | |
importance: | Undecided → Low |
Changed in openvswitch (Ubuntu Focal): | |
importance: | Undecided → Low |
Changed in openvswitch (Ubuntu Bionic): | |
importance: | Undecided → Low |
Changed in openvswitch (Ubuntu Xenial): | |
importance: | Undecided → Medium |
Changed in openvswitch (Ubuntu Hirsute): | |
status: | New → Triaged |
Changed in openvswitch (Ubuntu Groovy): | |
status: | New → Triaged |
Changed in openvswitch (Ubuntu Focal): | |
status: | New → Triaged |
Changed in openvswitch (Ubuntu Bionic): | |
status: | New → Triaged |
Changed in openvswitch (Ubuntu Xenial): | |
status: | New → Triaged |
Changed in openvswitch (Ubuntu Impish): | |
status: | Triaged → In Progress |
assignee: | nobody → James Page (james-page) |
Status changed to 'Confirmed' because the bug affects multiple users.