Red Hat Bugzilla – Bug 1009586
libvirtd created openvswitch ports (vnetX) may not be removed on graceful or improper shutdown
Last modified: 2015-08-26 18:18:00 EDT
Description of problem:
libvirt integration with openvswitch will issue an add-port request with an incremented vnet interface numbering. If the host system is incorrectly shutdown, or openvswitch-switch is shut down before libvirtd (for example, if the distribution does not specify openvswitch-switch as a startup/shutdown dependency for libvirtd - none currently do) then the vnet port will not be removed and on startup of the host system or domain the vnet port will be arbitrarily assigned.
Version-Release number of selected component (if applicable):
Most of the time
Steps to Reproduce:
1. Have libvirtd, libvirt-guests and openvswitch-switch enabled on system startup.
2. Create two or more domains with openvswitch interfaces defined to two different VLANs or openvswitch bridges
3. Startup the domains you have created with openvswitch interfaces
4. Restart the system gracefully or improperly
The vnet interfaces will not be removed from the openvswitch bridge on shutdown by libvirtd, if openvswitch-switch is shutdown before libvirtd (usually the default on distributions) or if the system is shutdown incorrectly. openvswitch keeps a persistent configuration of added ports. You can observe this behaviour by observing (after a restart):
# ovs-vsctl show
You will see the vnet interfaces are defined, even with no domains started. If you start the domains, the vnet ports will not be removed and will be assigned randomly based on startup order.
* When libvirt starts a domain, with openvswitch interfaces the vnet interfaces should first be removed and then added to prevent this issue from occurring (especially on incorrect system shutdown.)
* libvirtd should require openvswitch-switch as a startup dependency at the distribution level.
Who does this Peter guy think he is?
This issue is still present in 1.2.2.