"systemctl stop openvswitch-switch" will remove /var/run/openvswitch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Server Guide |
Fix Released
|
Undecided
|
Unassigned | ||
dpdk (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
openvswitch (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
Confirmed
|
Undecided
|
Unassigned | ||
Focal |
Confirmed
|
Undecided
|
Unassigned | ||
Groovy |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* The current systemd profile (only active in Debian/Ubuntu) in that form
has a runtime directory. But in the default that means the runtime
dir is removed on service stop or restart.
* In the past dpdhvhostuser connections used to use paths under that run dir
which was no problem as they were dead on restart anyway. But more modern
dpdkvhostuse
and the dir removal kills that and effectively prevents to keep guest
networking alive.
* The fix ensures the directory is kept around via the proper systemd
statement
[Test Case]
* start the service and touch any new file in there e.g.
$ touch /var/run/
After a restart this should still be there
$ systemctl restart openvswitch-switch
$ ls -laF /var/run/
[Where problems could occur]
* In our discussions we didn't find a reason that requires to clean that
directory. But if there are any setup scenarios we have forgotten that need
it then on restart they will have to deal with that "old content".
Therefore on service restart is the place to watch out for regressions.
[Other Info]
* n/a
---
TL;DR:
- stoping/restarting OVS clears /var/run/
- out of the "vhostuser" connection times a common socket path used
was at /var/run/
- if that path used with "vhostuserclient" that removes the sockets
on OVS stop/restart
- Since qemu in server mode only creates this sockets once (as by
the client/server design makes sense) that breaks the guests until
restarted which is what the tech of vhostuserclient wanted to avoid.
+ Workaround: do use a different path like e.g.
"/var/
+ Solution: let us think if we could keep the path around on stop/restart
--- vv original report vv ---
My system is Ubuntu 18.04, I installed ovs DPDK by apt-get and used ovs-vswitchd DPDK version, but when I stop openvswitch-switch (sudo systemctl stop openvswitch-
Related branches
- Ubuntu Server Developers: Pending requested
-
Diff: 24 lines (+8/-0)2 files modifieddebian/changelog (+7/-0)
debian/openvswitch-switch.ovsdb-server.service (+1/-0)
- Ubuntu Server Developers: Pending requested
-
Diff: 29 lines (+8/-2)2 files modifieddebian/changelog (+7/-2)
debian/openvswitch-switch.ovsdb-server.service (+1/-0)
- Ubuntu Server Developers: Pending requested
-
Diff: 24 lines (+8/-0)2 files modifieddebian/changelog (+7/-0)
debian/openvswitch-switch.ovsdb-server.service (+1/-0)
- Frode Nordahl: Pending requested
- James Page: Pending requested
-
Diff: 24 lines (+8/-0)2 files modifieddebian/changelog (+7/-0)
debian/openvswitch-switch.ovsdb-server.service (+1/-0)
# ps aux | grep ovs-vswitchd run/openvswitch /db.sock -vconsole:emer -vsyslog:err -vfile:info --mlockall --no-chdir --log-file= /var/log/ openvswitch/ ovs-vswitchd. log --pidfile= /var/run/ openvswitch/ ovs-vswitchd. pid --detach openvswitch/ 75975.ctl 75906.ctl openvswitch/ openvswitch/ ': No such file or directory
root 75975 200 0.3 135321916 222240 ? S<Lsl Jan04 2957:13 ovs-vswitchd unix:/var/
root 2101431 0.0 0.0 13136 1004 pts/1 S+ 08:34 0:00 grep --color=auto ovs-vswitchd
# ls /var/run/
br-ex.mgmt br-int.snoop data.mgmt ovs-vswitchd.
br-ex.snoop br-smgt.mgmt data.snoop ovs-vswitchd.pid
br-floating.mgmt br-smgt.snoop db.sock
br-floating.snoop br-tun.mgmt ovsdb-server.
br-int.mgmt br-tun.snoop ovsdb-server.pid
# systemctl stop openvswitch-switch
# ls -l /var/run/
ls: cannot access '/var/run/
#