Commit 7e8a978
Balazs Gibizer
Only unplug vif after the device is detached from libvirt
There is a potential race between unplugging a vif and removing the
related device from the domain XML. During macvtap (hw_veb) unplug nova
tries to reset the MAC and VLAN config of the VF used for the macvtap.
However as it is done before the macvtap device is removed from the
domain, libvirt still feels responsible to the VF too and restores the
configuration. This leads to a situation where the macvtap is removed
successfully but the VF behind it left configured with the MAC address
and VLAN id of the neutron port.
This patch changes the order of the operations. First the device is
detached from libvirt and then the vif is unplugged.
Part of blueprint sriov-interface-attach-detach
Change-Id: Iea126857725502dc2eef6e53894d8755d0e2e7f41 parent c21f08f commit 7e8a978
File tree
2 files changed
+13
-3
lines changed- nova
- tests/unit/virt/libvirt
- virt/libvirt
2 files changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23480 | 23480 | | |
23481 | 23481 | | |
23482 | 23482 | | |
23483 | | - | |
| 23483 | + | |
| 23484 | + | |
23484 | 23485 | | |
23485 | 23486 | | |
23486 | 23487 | | |
23487 | | - | |
| 23488 | + | |
23488 | 23489 | | |
23489 | 23490 | | |
23490 | 23491 | | |
| |||
23506 | 23507 | | |
23507 | 23508 | | |
23508 | 23509 | | |
| 23510 | + | |
| 23511 | + | |
23509 | 23512 | | |
23510 | 23513 | | |
23511 | 23514 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2240 | 2240 | | |
2241 | 2241 | | |
2242 | 2242 | | |
2243 | | - | |
2244 | 2243 | | |
2245 | 2244 | | |
2246 | 2245 | | |
| |||
2320 | 2319 | | |
2321 | 2320 | | |
2322 | 2321 | | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
| 2326 | + | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
2323 | 2330 | | |
2324 | 2331 | | |
2325 | 2332 | | |
| |||
0 commit comments