Reviewed: https://review.opendev.org/c/openstack/nova/+/815373 Committed: https://opendev.org/openstack/nova/commit/16f7c601b63bd1e7ca13917261300a7064ec72bc Submitter: "Zuul (22348)" Branch: master
commit 16f7c601b63bd1e7ca13917261300a7064ec72bc Author: Gustavo Santos <[email protected]> Date: Mon Oct 25 16:32:10 2021 -0300 Reattach mdevs to guest on resume When suspending a VM in OpenStack, Nova detaches all the mediated devices from the guest machine, but does not reattach them on the resume operation. This patch makes Nova reattach the mdevs that were detached when the guest was suspended. This behavior is due to libvirt not supporting the hot-unplug of mediated devices at the time the feature was being developed. The limitation has been lifted since then, and now we have to amend the resume function so it will reattach the mediated devices that were detached on suspension. Closes-bug: #1948705 Signed-off-by: Gustavo Santos <[email protected]> Change-Id: I083929f36d9e78bf7713a87cae6d581e0d946867 ** Changed in: nova Status: In Progress => Fix Released -- 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/1948705 Title: vGPU instance is not reattached to guest on resume Status in OpenStack Compute (nova): Fix Released Bug description: Description =========== When suspending a guest with a vGPU instance attached to it, Nova asks libvirt to detach that device, since the guest can't be suspended otherwise. When resuming that guest, however, it comes back without the vGPU instance previously attached to it. This happens because, at the time the feature was developed, libvirt did not support hot unplugging mediated devices [1]. That limitation has been lifted since then, and the resume operation needs to be modified in order to reattach the mediated device (vGPU instance) that was detached on suspend. [1] https://opendev.org/openstack/nova/src/branch/master/nova/virt/libvirt/driver.py#L8003 Steps to reproduce ================== 1 - Set up the environment in order to provide vGPU capabilities to Nova; 2 - Spawn an instance using a flavor that asks for a vGPU; 3 - Suspend the instance; 4 - Resume the instance; Expected result =============== After resuming the instance, it should still have a vGPU instance attached. Actual result ============= The instance comes back without a vGPU attached. Environment =========== - Tested on StarlingX OpenStack - Ussuri; master code still does not provide a fix. - Libvirt v4.7.0 + KVM. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1948705/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

