Merge "libvirt: fix alternative_device_name for detaching interfaces"
This commit is contained in:
commit
a43dbba2b8
|
@ -1467,7 +1467,7 @@ class LibvirtDriver(driver.ComputeDriver):
|
||||||
# timeout.
|
# timeout.
|
||||||
wait_for_detach = guest.detach_device_with_retry(
|
wait_for_detach = guest.detach_device_with_retry(
|
||||||
guest.get_interface_by_cfg, cfg, live=live,
|
guest.get_interface_by_cfg, cfg, live=live,
|
||||||
alternative_device_name=vif.get('address'))
|
alternative_device_name=self.vif_driver.get_vif_devname(vif))
|
||||||
wait_for_detach()
|
wait_for_detach()
|
||||||
except exception.DeviceNotFound:
|
except exception.DeviceNotFound:
|
||||||
# The interface is gone so just log it as a warning.
|
# The interface is gone so just log it as a warning.
|
||||||
|
|
|
@ -429,9 +429,11 @@ class Guest(object):
|
||||||
|
|
||||||
persistent = self.has_persistent_configuration()
|
persistent = self.has_persistent_configuration()
|
||||||
|
|
||||||
LOG.debug('Attempting initial detach for device %s', device)
|
LOG.debug('Attempting initial detach for device %s',
|
||||||
|
alternative_device_name)
|
||||||
_try_detach_device(conf, persistent, live)
|
_try_detach_device(conf, persistent, live)
|
||||||
LOG.debug('Start retrying detach until device %s is gone.', device)
|
LOG.debug('Start retrying detach until device %s is gone.',
|
||||||
|
alternative_device_name)
|
||||||
|
|
||||||
@loopingcall.RetryDecorator(max_retry_count=max_retry_count,
|
@loopingcall.RetryDecorator(max_retry_count=max_retry_count,
|
||||||
inc_sleep_time=inc_sleep_time,
|
inc_sleep_time=inc_sleep_time,
|
||||||
|
|
Loading…
Reference in New Issue