Bug 1009586 - libvirtd created openvswitch ports (vnetX) may not be removed on graceful or improper shutdown
Summary: libvirtd created openvswitch ports (vnetX) may not be removed on graceful or ...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-18 16:22 UTC by Peter Kieser
Modified: 2015-08-26 22:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-26 22:18:00 UTC
Embargoed:


Attachments (Terms of Use)

Description Peter Kieser 2013-09-18 16:22:29 UTC
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):
1.1.2

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:
N/A

Comment 1 Steve Jobs 2013-09-18 16:38:56 UTC
Who does this Peter guy think he is?

Comment 2 Peter Kieser 2014-04-25 16:50:11 UTC
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.