nova/nova/virt/libvirt
Matt Riedemann 02ad4f862a libvirt: wait for interface detach from the guest
The test_reassign_port_between_servers test in Tempest creates
a port in neutron and two servers. It attaches the port to the
first server and then quickly detaches it and waits for the
port.device_id to be unbound from the server. Then it repeats
that for the second server.

The interface detach from the guest is asynchronous and happens
before nova unbinds the port, so there is a race where the port's
device_id is unset but the interface is still on the first guest
when we try to attach to the second guest, which fails.

This is a latent bug, but apparently has been tickled by the
move to our neutron CI jobs to use ubuntu xenial nodes.

The fix is to add a detach and retry loop on the interface detach
on the guest so that we can wait until the interface is gone
from the guest before nova unbinds the port in neutron, which is
what the Tempest test is waiting for. Then the device should be
available for attaching to the second guest.

This is similar to what we do with detaching volumes.

Closes-Bug: #1607714

Change-Id: Ic04aad8923ea2edf1d16e32c208cd41fdf898834
(cherry picked from commit a3b3e8d831)
2017-08-08 11:42:30 -04:00
..
storage Merge "Fix decoding of encryption key passed to dmcrypt" into stable/ocata 2017-05-23 23:31:32 +00:00
volume libvirt: handle missing rbd_secret_uuid from old connection info 2017-06-12 09:16:49 -04:00
__init__.py Remove vi modelines 2014-02-03 14:19:44 +00:00
blockinfo.py Merge "Fix root_device_name for Xen" 2017-01-31 18:56:46 +00:00
compat.py Replace deprecated LOG.warn with LOG.warning 2016-03-15 11:57:56 +00:00
config.py libvirt: Use the mirror element to detect job completion 2017-01-25 11:35:47 +00:00
designer.py libvirt: conditionally set script path for ethernet vif types 2017-03-21 15:09:28 -04:00
driver.py libvirt: wait for interface detach from the guest 2017-08-08 11:42:30 -04:00
firewall.py libvirt: ignore conflict when defining network filters 2016-09-22 13:53:38 -04:00
guest.py libvirt: wait for interface detach from the guest 2017-08-08 11:42:30 -04:00
host.py [py35] Fixes to get rally scenarios working 2017-01-13 15:44:00 +00:00
imagebackend.py get_model method missing for Ploop image 2017-03-20 17:59:10 +00:00
imagecache.py Port libvirt test_imagecache to Python 3 2016-11-23 19:51:42 +08:00
instancejobtracker.py Replace deprecated LOG.warn with LOG.warning 2016-03-15 11:57:56 +00:00
migration.py Change exponential function to linear 2017-01-26 15:24:20 +00:00
utils.py Merge "libvirt: workaround findmnt behaviour change" 2017-02-03 13:37:23 +00:00
vif.py Use six.text_type() when logging Instance object 2017-05-22 10:57:28 +00:00