]> xenbits.xensource.com Git - libvirt.git/commit
openvswitch: Delete port if it exists while adding a new one
authorChunhe Li <lichunhe@huawei.com>
Mon, 14 Jul 2014 10:37:50 +0000 (12:37 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 14 Jul 2014 10:49:30 +0000 (12:49 +0200)
commit33445ce8446d9d061a1620cd8ec5e81fcca127d9
treeb67af7d00fbf5589b4fa1862c7a4378d57ffa761
parent1c89f6ebd40579a49657084604b0c7537dd115c6
openvswitch: Delete port if it exists while adding a new one

If the openvswitch service is stopped, and is followed by destroying a
VM, the openvswitch bridge translates into a state where it doesn't
recover the port configuration. While it successfully fetches data
from the internal DB, since the corresponding virtual interface does
not exists anymore the whole recovery process fails leaving restarted
VM with inability to connect to the bridge. The following set of
commands will trigger the problem:

virsh start vm
service openvswitch-switch stop
virsh destroy vm
service openvswitch-switch start
virsh start vm

Signed-off-by: Chunhe Li <lichunhe@huawei.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virnetdevopenvswitch.c