Ernesto Domato
2013-Mar-04 17:46 UTC
[libvirt-users] Fwd: OpenVSwitch and libvirt integration problem at shutdown/reboot
Hi everyone, I'm forwarding this mail that I wrote to OpenVSwitch dev list because I think that you could maybe help me a little :-) What did you think about the patch to libvirt that I'm using?. At least, it worked for me :-) Thanks. Ernesto ---------- Forwarded message ---------- From: Ernesto Domato <edomat at gmail.com> Date: Mon, Mar 4, 2013 at 2:09 PM Subject: OpenVSwitch and libvirt integration problem at shutdown/reboot To: dev at openvswitch.org Hi everyone, this mail is related to a bug report that I did on Debian (#701760) that I wasn't able to resolve yet and want to know if someone has the same problem and how could I fix it. The problem that I'm having is that on shutdown/reboot of the machine that holds the virtual machines that use OVS, the OVS-Switch is going down before libvirt finish to shutdown the VMs. This cause that libvirt can?t unregister the virtual interface from the OVS-Switch and it hangs the shutdown/reboot process. The only way that I have to solve this at that point is to log in by SSH and restart the OVS-Switch so libvirt can finish unregistering the interfaces and the system continue with the task asked. What I tried too is to patch the libvirt to use the --no-wait flag for ovs-vsctl command that deletes the virtual interface so it doesn't hang when OVS-Switch isn't running. It worked on the sense that the system does shutdown/reboot but next time it boot, the VMs stop responding, I have to delete the virtual interface from OVS-Switch and register it again and then the VM start responding again. I guess that this happens because the virtual interface was never deleted from OVS-DB and when the system boots again there's like an old reference to the virtual interface that provoke this behavior. Have anyone had this problem?, how did you solve it?, what your suggestion for me?. Looking at the manpages, I'll try another patch for libvirt that will delete the interface with the flag --if-exists before adding it back on libvirt start of the VM so, if the OVS-DB already has the interface, it is deleted. If this works, do you think it's a good solution?, or should it be implemented in other ways?. Thanks for all and excuse my english but it's not my native language. Ernesto -------------- next part -------------- A non-text attachment was scrubbed... Name: libvirt.patch Type: application/octet-stream Size: 1444 bytes Desc: not available URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130304/51e5e02d/attachment.obj>
Eric Blake
2013-Mar-04 23:03 UTC
[libvirt-users] Fwd: OpenVSwitch and libvirt integration problem at shutdown/reboot
On 03/04/2013 10:46 AM, Ernesto Domato wrote:> Hi everyone, I'm forwarding this mail that I wrote to OpenVSwitch dev > list because I think that you could maybe help me a little :-) > > What did you think about the patch to libvirt that I'm using?. At > least, it worked for me :-)I'm not familiar with openVSwitch enough myself to give definitive answers, but I will point out a similar thread with a similar concern...> > Thanks. > Ernesto > > ---------- Forwarded message ---------- > From: Ernesto Domato <edomat at gmail.com> > Date: Mon, Mar 4, 2013 at 2:09 PM > Subject: OpenVSwitch and libvirt integration problem at shutdown/reboot > To: dev at openvswitch.org > > > Hi everyone, this mail is related to a bug report that I did on Debian > (#701760) that I wasn't able to resolve yet and want to know if > someone has the same problem and how could I fix it. > > The problem that I'm having is that on shutdown/reboot of the machine > that holds the virtual machines that use OVS, the OVS-Switch is going > down before libvirt finish to shutdown the VMs.If we know that libvirt is relying on some other service being present, then it is in our best interest to guarantee shutdown ordering between the two services so that libvirt always shuts down before OVS-Switch. I have no idea what the service name for this would be, but check out this patch for the approach to get systemd to enforce a shutdown dependency: https://www.redhat.com/archives/libvir-list/2013-March/msg00096.html -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 621 bytes Desc: OpenPGP digital signature URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130304/1334d9f5/attachment.sig>
Apparently Analagous Threads
- Shorewall and OpenVSwitch on Debian
- Using Openvswitch and qemu:///session
- libvirt + openvswitch, <parameters interfaceid='x'/> seems less-than-useful?
- Re: libvirt + openvswitch, <parameters interfaceid='x'/> seems less-than-useful?
- Libvirt 1.0.5 with Openvswitch 1.11.90: unable to add bridge br0 port vnet0 operation not supported