← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1522400] [NEW] check the libvirt driver finally detach a device

 

Public bug reported:

Now nova support detach a device dynamically, but it is not guaranteed
to succeed.


What happens is that the hypervisor injects an ACPI request to unplug the device. The guest OS must co-operate by releasing the device, before the hypervisor will complete the action of physically removing it. So when require a guest OS that supports ACPI unplug of course, and if the guest is crashed or being malicious there is no guarantee the unplug will succeed. Libvirt will wait a short while for success, but nova must monitor for libvirt events to see if/when it finally completes. This delayed release has implications for when Nova can mark the PCI device as unused and available for other guests to assign.

here is the libvirt doc string about detachDeviceFlags.
 http://paste.openstack.org/show/480330/
 
 it says 
 To check whether the device was successfully removed, either recheck domain
 configuration using virDomainGetXMLDesc() or add handler for
 VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED
 If so we  can sync check by virDomainGetXMLDesc().
 Or async notification that the device is removed by an event handler.
 and this is the nova code about detach_interface.
 https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L4940

** Affects: nova
     Importance: Undecided
     Assignee: lvmxh (shaohef)
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1522400

Title:
  check the libvirt driver  finally detach a device

Status in OpenStack Compute (nova):
  New

Bug description:
  Now nova support detach a device dynamically, but it is not guaranteed
  to succeed.

  
  What happens is that the hypervisor injects an ACPI request to unplug the device. The guest OS must co-operate by releasing the device, before the hypervisor will complete the action of physically removing it. So when require a guest OS that supports ACPI unplug of course, and if the guest is crashed or being malicious there is no guarantee the unplug will succeed. Libvirt will wait a short while for success, but nova must monitor for libvirt events to see if/when it finally completes. This delayed release has implications for when Nova can mark the PCI device as unused and available for other guests to assign.

  here is the libvirt doc string about detachDeviceFlags.
   http://paste.openstack.org/show/480330/
   
   it says 
   To check whether the device was successfully removed, either recheck domain
   configuration using virDomainGetXMLDesc() or add handler for
   VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED
   If so we  can sync check by virDomainGetXMLDesc().
   Or async notification that the device is removed by an event handler.
   and this is the nova code about detach_interface.
   https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L4940

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1522400/+subscriptions