nova may leak net interface in guest if port under attaching/deleting
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Medium
|
Alexandre arents | ||
neutron |
New
|
Undecided
|
Unassigned |
Bug Description
Description
===========
It seems that nova may leak network interface in guest
if a port deletion is run in the middle of the a port attachment
in compute manager, attach_interface run atomically
the following tasks:
-update port in neutron(Binding)
-...
-driver.
-update net_info_cache
-...
When a Bound port is deleted, nova receive an event
"network-
def _process_
....
driver.
if this event processing is done just after port binding
and before driver.
ongoing interface attachment of the same port,
nova will attach the deleted orphan interface to guest
Probably, the this event processing must be synchronized
with compute manager method attach_
Steps to reproduce
==================
on master devstack:
$openstack server create --flavor m1.small --image cirros-
--nic net-id=private myvm
$openstack port create --network private myport
# For ease of reproduction add a pause just before driver.
nova/compute/
def attach_interface()
try:
time.sleep(8)
self.
$sudo service devstack@n-cpu restart
$openstack server add port myvm myport &
$sleep 4 ; openstack port delete myport
[1]+ Exit 1 openstack server add port myvm myport
Port id 3d47bceb-
$ nova interface-list alex
+------
| Port State | Port ID | Net ID | IP addresses | MAC Addr | Tag |
+------
| ACTIVE | 0fe9365b-
+------
$ virsh domiflist instance-00000001
Interface Type Source Model MAC
-------
tap0fe9365b-57 bridge br-int virtio fa:16:3e:b8:f1:4c
tapdcbbae72-0b bridge br-int virtio fa:16:3e:95:91:25
Expected result
===============
interface should not be attached to guest
Actual result
=============
zombie interface is attached to guest
Changed in nova: | |
assignee: | nobody → Alexandre arents (aarents) |
Changed in nova: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Fix proposed to branch: master /review. opendev. org/c/openstack /nova/+ /799606
Review: https:/