check the libvirt driver finally detach a device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Undecided
|
Unassigned |
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://
it says
To check whether the device was successfully removed, either recheck domain
configuration using virDomainGetXML
VIR_DOMAIN_
If so we can sync check by virDomainGetXML
Or async notification that the device is removed by an event handler.
and this is the nova code about detach_interface.
https:/
tags: | added: libvirt |
I also file a spec: https:/ /review. openstack. org/#/c/ 251141/
But all agree to file a bug.