[ovs-dev] OpenVSwitch and libvirt integration problem at shutdown/reboot

Ernesto Domato edomat at gmail.com
Mon Mar 4 20:08:05 UTC 2013


On Mon, Mar 4, 2013 at 4:49 PM, Ansis Atteka <aatteka at nicira.com> wrote:
> Though, I do agree that, if Open vSwitch was terminated before libvirt
> for whatever reason, then libvirt still shouldn't hang because of
> that. And on the next startup libvirt should try to clean up whatever
> was left in OVS DB from its previous runs.

Ok, I already send a patch for libvirt to this list and libvirt list
with a fix that works this way:

at start up, libvirt runs: ovs-vsctl --no-wait --timeout 5 --
--if-exists del-port vnet0 -- --may-exist add-port ovsbr0 vnet0 -- set
Interface vnet0 "external-ids:attached-mac=\"52:54:00:FF:D0:9C\"" --
set Interface vnet0
"external-ids:iface-id=\"eafbcb1f-3758-e976-015e-7a1f1029b1af\"" --
set Interface vnet0
"external-ids:vm-id=\"11245af8-b3ed-0d7c-7fd2-11c692d01da4\"" -- set
Interface vnet0 external-ids:iface-status=active

The part that I added was the "--no-wait --timeout 5 -- --if-exists
del-port vnet0" portion.

I also added "--no-wait --timeout 5" when libvirt goes down so it can
timeout if ovs-switch is down.

It works perfect and think that it does what you recommended, but
maybe I'm wrong :-)

Thanks.
Ernesto



More information about the dev mailing list