instance.request_spec not updated upon resize
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Description
===========
We don't update instance.
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 PCIPassthroughF
Environment
===========
Reproduced on master with a functional test, also reported on OSP 16.1 aka stable/train: https:/
Changed in nova: | |
status: | Confirmed → Opinion |
status: | Opinion → Confirmed |
Changed in nova: | |
status: | Confirmed → In Progress |
Fix proposed to branch: master /review. opendev. org/c/openstack /nova/+ /805882
Review: https:/