Bug 1009586 - libvirtd created openvswitch ports (vnetX) may not be removed on graceful or improper shutdown
libvirtd created openvswitch ports (vnetX) may not be removed on graceful or ...
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Libvirt Maintainers
Depends On:
  Show dependency treegraph
Reported: 2013-09-18 12:22 EDT by Peter Kieser
Modified: 2015-08-26 18:18 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-08-26 18:18:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Peter Kieser 2013-09-18 12:22:29 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):

How reproducible:
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

Actual results:
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.

Expected results:
* 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.

Additional info:
Comment 1 Steve Jobs 2013-09-18 12:38:56 EDT
Who does this Peter guy think he is?
Comment 2 Peter Kieser 2014-04-25 12:50:11 EDT
This issue is still present in 1.2.2.

Note You need to log in before you can comment on or make changes to this bug.