Flavors may not meet the image minimum requirement when resize

Bug #2007968 reported by zhouzhong
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Committed
Medium
zhou zhong
OpenStack Dashboard (Horizon)
Invalid
Undecided
zhou zhong

Bug Description

Description
===========
When resize instance, the flavors returned may not meet the image minimum memory requirement, resizing instance ignores the minimum memory limit of the image, which may cause the resizing be successfully, but the instance fails to start because the memory is too small to run the system.

Steps to reproduce
==================
1.create an instance with image min_ram 4096
2.resize the instance
3.watch the returned flavors

Expected result
===============
do not include the flavors which memory less than 4096.

Actual result
=============
returned all of the visible flavors.

Environment
===========

Logs & Configs
==============

zhou zhong (zhouzhongg)
Changed in horizon:
assignee: nobody → Zhong Zhou (zhongzhou)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to horizon (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/horizon/+/905198

Revision history for this message
Amit Uniyal (auniyal) wrote (last edit ):

Hello,
the changes you made are in nova and not in horizon, do you have another path with closes-bug.
can you please attach an image with which you tested this?

Revision history for this message
zhou zhong (zhouzhongg) wrote :
Download full text (14.7 KiB)

Yes, I reported the bug in horizon, but fixed it in nova, sorry for the confusion caused, this is the only patch at:
https://review.opendev.org/c/openstack/nova/+/906813

there's nothing else, and the horizon patch I will abandon it.

====================================

Here is the test

Before the patch:

1.Booting an instance from volume, minimum memory is 8G, all the detail as follow:
()[root@busybox-openstack-67c45bbfc8-qt8fh /]# nova show bc2dbab9-eb2f-4a4f-b16a-e7392b5af4cb
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | test |
| OS-EXT-SRV-ATTR:host | node-5.domain.tld |
| OS-EXT-SRV-ATTR:hostname | zztest |
| OS-EXT-SRV-ATTR:hypervisor_hostname | node-5.domain.tld |
| OS-EXT-SRV-ATTR:instance_name | instance-00000350 |
| OS-EXT-SRV-ATTR:kernel_id | |
| OS-EXT-SRV-ATTR:launch_index | 0 ...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by "zhouzhong <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/horizon/+/905198
Reason: Fix it in nova: https://review.opendev.org/c/openstack/nova/+/906813

Changed in horizon:
status: New → Invalid
Changed in nova:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → zhou zhong (zhouzhongg)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/907642

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.opendev.org/c/openstack/nova/+/907642
Committed: https://opendev.org/openstack/nova/commit/b434b4276194e6205362b3b7b4beb35686b3d585
Submitter: "Zuul (22348)"
Branch: master

commit b434b4276194e6205362b3b7b4beb35686b3d585
Author: zhong.zhou <email address hidden>
Date: Sat Feb 3 12:56:02 2024 +0800

    Regression test for bug 2007968

    Related-Bug: 2007968
    Change-Id: I9d5a3813cad3c9ee1c6097959a972cf8307795cd

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.opendev.org/c/openstack/nova/+/906813
Committed: https://opendev.org/openstack/nova/commit/f3eb76e57b8cafaeb892366550dc6bfaa4d2b4bb
Submitter: "Zuul (22348)"
Branch: master

commit f3eb76e57b8cafaeb892366550dc6bfaa4d2b4bb
Author: zhong.zhou <email address hidden>
Date: Sat Feb 3 23:58:41 2024 +0800

    Validate flavor image min ram when resize volume-backed instance

    When resize instance, the flavors returned may not meet the image
    minimum memory requirement, resizing instance ignores the minimum
    memory limit of the image, which may cause the resizing be
    successfully, but the instance fails to start because the memory is
    too small to run the system.

    Related-Bug: 2007968
    Change-Id: I132e444eedc10b950a2fc9ed259cd6d9aa9bed65

zhou zhong (zhouzhongg)
Changed in nova:
status: Triaged → Fix Committed
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.