You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix volume-backed resize with a smaller disk flavor
Change I06fad233006c7bab14749a51ffa226c3801f951b in Stein started
calling _validate_flavor_image_nostatus during resize but did not
pass the root_bdm since the underlying volume does not change. This
can, however, lead to FlavorDiskSmallerThanMinDisk being raised
if the new flavor has a disk size smaller than the current flavor.
This is wrong in the case of a volume-backed server because we don't
care about the root disk size in the flavor in that case.
This fixes the bug by splitting the pci/numa validation logic out
of _validate_flavor_image_nostatus into a separate method so that
the resize method can call that directly for a volume-backed server
rather than deal with the complicated disk size logic in
_validate_flavor_image_nostatus (see bug 1646740 for details, but
tl;dr if the image min_disk is less than the flavor root_gb, the
min_disk stored in the instance image system metadata is the
flavor['root_gb'] which could be larger than the root volume size).
To see why trying to use _validate_flavor_image_nostatus during
resize for a volume-backed server is a mess, look at PS1 of this
change.
Change-Id: I91c9c1e88afa035c757f692c78ad72d69cc3c431
Closes-Bug: #1825020
0 commit comments