use real disk size to consider whether it's a resize down

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

Bug Description

I have following flavor

jichen@controller:~$ nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 11 | t.test1 | 512 | 1 | 5 | | 1 | 1.0 | True |
| 12 | t.test2 | 512 | 1 | 2 | | 1 | 1.0 | True |

I use
nova boot --config-drive True --flavor 11 --key_name mykey --image 99ebce05-c5d2-4829-bc25-004a8d3f3efb --nic net-id=45f1ac55-e6bc-444e-be8b-3112c84646a8 --ephemeral size=1 t9

to boot a new instance ,so the eph disk is 1 G now

if we resize to flavor 12, it will fail now, but we can compare the real eph disk size and see whether we an resize it or not

Tags: compute
jichenjc (jichenjc)
Changed in nova:
assignee: nobody → jichenjc (jichenjc)
Tracy Jones (tjones-i)
tags: added: compute
Joe Gordon (jogo)
Changed in nova:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/98629

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by jichenjc (<email address hidden>) on branch: master
Review: https://review.openstack.org/98629
Reason: wrong git operation :(

have to submit another patch

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/100546

Revision history for this message
Sean Dague (sdague) wrote :

patch still active

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

Reviewed: https://review.openstack.org/100546
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a6a542dbd48b51eb8005c0101afa2f1ae5c834d0
Submitter: Jenkins
Branch: master

commit a6a542dbd48b51eb8005c0101afa2f1ae5c834d0
Author: jichenjc <email address hidden>
Date: Tue Jun 17 05:25:25 2014 +0800

    Use real disk size to consider a resize down

    When resize an instance, we don't allow a resize down operation.
    Currently, a flavor ephemeral size will be used to do the check,
    but usually we might create ephemeral size less than flavor
    ephemeral size. This patch use the real disk size to do the resize
    instead of the flavor ephemeral size.

    Also, the test cases are updated to change from dict to objects,
    if we change the flavor from dict to objects will benefit from it.

    Change-Id: I03006a2ee8edf310a3ad374ebb7e4cd4034f8250
    Closes-Bug: #1324005

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-1 → 2015.1.0
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.