While the behavior has "more impact" when running with openvswitch-dpdk as one 
common path to put the sockets is under /var/run/openvswitch the problem is 
only in openvswitch.
I updated the bug tasks accordingly.

@Yi: I've checked my setups why I haven't seen this before and indeed I usually 
use a path like
"/var/run/vhostuserclient/vhost-user-client-1" and it works fine - so using 
something like that might be more than just a workaround for you.


Never the less I happen to know that /var/run/openvswitch was in some guides in 
the past. I even fixed one stray reference in our own docs [2] now to fully use 
"/var/run/vhostuserclient/vhost-user-client-1" as shown above (its examples had 
a mix of paths up to now).
So thanks for the report for that alone !


The upstream OVS docs [1] usually seem to use a path like 
"/tmp/dpdkvhostclient0".
But even in there are examples of "/usr/local/var/run/openvswitch/vhost-user-1".
Reading that has made me realize that those paths with the pattern 
"/var/run/openvswitch" are all from the pre vhostuserclient time, and back then 
restarting OVS killed the connection anyway.
So it wasn't a problem back then, but if users keep using those paths with 
vhostuserclient - then it is a problem.

Adding a TL;DR to the bug description.

[1]: https://docs.openvswitch.org/en/latest/topics/dpdk/vhost-user/
[2]: https://ubuntu.com/server/docs/openvswitch-dpdk

** Description changed:

+ TL;DR:
+ - stoping/restarting OVS clears /var/run/openvswitch
+ - out of the "vhostuser" connection times a common socket path used
+   was at /var/run/openvswitch
+ - 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/run/vhostuserclient/vhost-user-client-1"
+ + 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-switch), /var/run/openvswitch is removed, so
  the exisitng VMs can't be accessed any more. I don't know why it is
  removed and who removed it.

** Changed in: openvswitch (Ubuntu)
   Importance: Undecided => Medium

** Also affects: serverguide
   Importance: Undecided
       Status: New

** Changed in: serverguide
       Status: New => Fix Released

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

Title:
  "systemctl stop openvswitch-switch" will remove /var/run/openvswitch

To manage notifications about this bug go to:
https://bugs.launchpad.net/serverguide/+bug/1910209/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to