yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #89485
[Bug 1941005] Re: instance.request_spec not updated upon resize
Reviewed: https://review.opendev.org/c/openstack/nova/+/852296
Committed: https://opendev.org/openstack/nova/commit/a93092e0d5c1483f9ad48276708ee35c54ce44fe
Submitter: "Zuul (22348)"
Branch: master
commit a93092e0d5c1483f9ad48276708ee35c54ce44fe
Author: Balazs Gibizer <gibi@xxxxxxxxxx>
Date: Sat Aug 6 16:09:54 2022 +0200
Update RequestSpec.pci_request for resize
Nova uses the RequestSpec.pci_request in the PciPassthroughFilter to
decide if the PCI devicesm, requested via the pci_alias in the flavor
extra_spec, are available on a potential target host. During resize the
new flavor might contain different pci_alias request than the old flavor
of the instance. In this case Nova should use the pci_alias from the new
flavor to scheduler the destination host of the resize. However this
logic was missing and Nova used the old pci_request value based on the
old flavor. This patch adds the missing logic.
Closes-Bug: #1983753
Closes-Bug: #1941005
Change-Id: I73c9ae27e9c42ee211a53bed3d849650b65f08be
** 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/1941005
Title:
instance.request_spec not updated upon resize
Status in OpenStack Compute (nova):
Fix Released
Bug description:
Description
===========
We don't update instance.request_spec when we resize to a new flavor. If the flavor's extra specs change, this is not reflected in instance.request_spec.
This goes generally unnoticed when *adding* stuff to the instance -
like PCI devices, for example. The scheduler will still find a host
based on the old request spec, but the resource claim on the
destination uses the flavor and image data directly, not the request
spec, so the claim will (correctly) fail if the destination does not
have the new things that the instance wants.
When *removing* stuff form the instance this becomes problematic. The
scheduler will attempt to schedule based on the old request spec,
which could end up with NoValidHost if no hosts exist that have the
*old* stuff the instance wanted, despite the new flavor not wanting
any of that stuff.
Steps to reproduce
==================
Let's use PCI devices as an example.
1. Have only two hosts, one with a single PCI device and one without.
2. Boot an instance with a flavor-based PCI device.
3. Resize it to a flavor without PCI devices.
Expected result
===============
The resize works - after all, we have one free host for the now-PCIless instance.
Actual result
=============
The resize fails with NoValidHost, the PCIPassthroughFilter having removed all the hosts (because it's using the original request spec with the PCI device).
Environment
===========
Reproduced on master with a functional test, also reported on OSP 16.1 aka stable/train: https://bugzilla.redhat.com/show_bug.cgi?id=1976707
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1941005/+subscriptions
References