stein: when use "openstack server resize" command, there is an error: Unexpected API Error.

Bug #1867077 reported by huang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Stephen Finucane

Bug Description

kolla-ansible: 8.0.1
openstack_release: "stein"
kolla_install_type: "source"
kolla_base_distro: "centos"

when I use "openstack server resize" command, there is an API error:

# openstack server resize --flavor m1.large haproxyserver
Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'nova.exception.FlavorDiskSmallerThanMinDisk'> (HTTP 500) (Request-ID: req-576f1e82-6d47-4c6a-87f1-1e552914f9d6)

Changed in nova:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/712766

Changed in nova:
assignee: nobody → Stephen Finucane (stephenfinucane)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/712766
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=efdcaf00e01b12ac15b938392b2f4b9e7db5eff1
Submitter: Zuul
Branch: master

commit efdcaf00e01b12ac15b938392b2f4b9e7db5eff1
Author: Stephen Finucane <email address hidden>
Date: Thu Mar 12 18:06:14 2020 +0000

    Handle flavor disk mismatches when resizing

    When resizing a non-volume-backed instance, we call the
    '_validate_flavor_image_nostatus' function to do a myriad of checks with
    the aim of ensuring the flavor and image don't conflict. One of these
    checks tests whether the flavor is requesting a smaller local disk than
    the size of the image of the minimum size the image says it requires. If
    this check fails, it will raise the 'FlavorDiskSmallerThanImage' or
    'FlavorDiskSmallerThanMinDisk' exceptions, respectively. We currently
    handle this exception in the 'create' and 'rebuild' flows but do not in
    the 'resize' path. Correct this by way of adding this exception to
    'INVALID_FLAVOR_IMAGE_EXCEPTIONS', a list of exceptions that can be
    raised when an flavor and image conflict.

    The fix for this issue also highlights another exception that can be
    raised in the three code paths but is not handled by them all,
    'FlavorMemoryTooSmall'. This is added to
    'INVALID_FLAVOR_IMAGE_EXCEPTIONS' also.

    Change-Id: Idc82ed3bcfc37220a50d9e2d552be5ab8844374a
    Signed-off-by: Stephen Finucane <email address hidden>
    Closes-Bug: #1867077

Changed in nova:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.