[libvirt] [discuss] add reconnect support for vhost-user

SGVsbG8gZXZlcnlvbmU6DQoNCiBJIHdhbnQgdG8gaW1wbGVtZW50IGEgZnVuY3Rpb24sIGl0IGlz IHVuY2xlYXIgd2hldGhlciBhbnlvbmUgaGFzIHN1Ym1pdHRlZCBzdWNoIGEgcGF0Y2guIA0KDQph ZGQgcmVjb25uZWN0IHN1cHBvcnQgZm9yIHZob3N0LXVzZXIgd2hlbiB1bml4IGNvbnRyb2wgc29j a2V0IGJldHdlZW4gdmhvc3QtdXNlciBhbmQgdmhvc3QtdXNlciBiYWNrZW5kIGlzICAgZGlzY29u bmVjdGVkIC4NCg0KDQoNCg0KeG1sIA0KDQoNCg0KIDxpbnRlcmZhY2UgdHlwZT0ndmhvc3R1c2Vy Jz4NCg0KICAgICAgPG1hYyBhZGRyZXNzPSdmYToxNjozZToxMDoyMzowMScvPg0KDQogICAgICA8 c291cmNlIHR5cGU9J3VuaXgnIHBhdGg9Jy9vcHQvbmV0d29yay9vdmRrL2Jpbi92aG9zdC5zb2Nr JyByZWNvbm5lY3Q9JzEwJyBtb2RlPSdjbGllbnQnLz4gLS0tLS0tLS0tLXJlY29ubmVjdCANCg0K ICAgICAgPG1vZGVsIHR5cGU9J3ZpcnRpbycvPg0KDQoNCiAgICA8L2ludGVyZmFjZT4NCg0KUmVj b25uZWN0IHZhbHVlICByZXByZXNlbnRzIHRoZSBpbnRlcnZhbCBzZWNvbmRzIGJldHdlZW4gcmVj b25uZWN0aW9uLg==

On 08/22/2017 03:54 AM, lu.zhipeng@zte.com.cn wrote:
Hello everyone:
I want to implement a function, it is unclear whether anyone has submitted such a patch.
add reconnect support for vhost-user when unix control socket between vhost-user and vhost-user backend is disconnected .
xml
<interface type='vhostuser'>
<mac address='fa:16:3e:10:23:01'/>
<source type='unix' path='/opt/network/ovdk/bin/vhost.sock' reconnect='10' mode='client'/> ----------reconnect
<model type='virtio'/>
I don't think I've seen any patch for this ever. However, it's questionable whether we should have this setting in the form you suggest. I mean, for timeout for OVS we have ovs_timeout setting in the libvirtd.conf config file. Maybe we can have ovs_reconnect in there too? Also, how does this work? Is it something that libvirt has to actively check for and if a disconnect is detected libvirt has to take an action? Or is this something that we tell qemu and whenever it loses connection it tries to reconnect after 10 seconds? So how is the interface device affected while it's disconnected from the socket? Michal
participants (2)
-
lu.zhipeng@zte.com.cn
-
Michal Privoznik