Unexpected result when create server booted from volume

Bug #1459491 reported by wangxiyuan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Matthew Booth
Kilo
Fix Released
Undecided
Unassigned

Bug Description

Enviroment:
flalvor :1 --- 1G disk.
volume :aaa ,---2G,bootable,image:bbb,
image:bbb 13M

when boot from volume like this:
nova boot --flavor 1 --nic net-id=xxx --boot-volume aaa
it will rasie an error: FlavorDiskTooSmall

when boot from volum like this:
nova boot --flavor 1 --nic net-id=xxx --block-device id=bbb,source=image,dest=volume,size=2,bootindex=0 test2
it goes well.

But,the second one is same with the first one.So,either the first or the second is unexcepted.

I think the second one should raise 'FlavorDiskTooSmall' error.

wangxiyuan (wangxiyuan)
Changed in nova:
assignee: nobody → wangxiyuan (wangxiyuan)
summary: - unexpect result when boot from volume
+ Unexpected result when create server booted from volume
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/186247

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

Change abandoned by wangxiyuan (<email address hidden>) on branch: master
Review: https://review.openstack.org/186247
Reason: Set root_gb to 0 looks better, another patch fixed it , Link:
https://review.openstack.org/#/c/196569/

wangxiyuan (wangxiyuan)
Changed in nova:
status: In Progress → Invalid
assignee: wangxiyuan (wangxiyuan) → nobody
Changed in nova:
assignee: nobody → Feodor Tersin (ftersin)
status: Invalid → In Progress
Changed in nova:
assignee: Feodor Tersin (ftersin) → Matthew Booth (mbooth-9)
Changed in nova:
assignee: Matthew Booth (mbooth-9) → Daniel Berrange (berrange)
Changed in nova:
assignee: Daniel Berrange (berrange) → Matthew Booth (mbooth-9)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 642c986f0636d52a9ba279c87e25082b4aa9b3b8
Author: Matthew Booth <email address hidden>
Date: Wed Jul 22 14:56:52 2015 +0100

    Don't check flavor disk size when booting from volume

    When creating a volume from an image, cinder copies the image metadata
    into volume properties. When booting from the volume, we read this
    metadata from the volume and use it as image metadata once again.

    While fixing the check against min_ram,
    change I861a78b5c7efa71e4bf7206d388b8d0d8048c78e introduced a
    regression which prevents a user from booting a volume which is larger
    than the flavor's disk. As we are not creating this disk, this check
    does not make sense. Similarly, it checks the image metadata's
    min_disk against the flavor disk size, which is not being used.

    This change leaves the image metadata check unaltered when creating a
    flavor disk. When booting from a volume, we check min_disk from image
    metadata against the actual size of the volume. We don't check the
    volume size at all. The check against min_ram is retained unaltered.

    Closes-Bug: #1457517
    Closes-Bug: #1459491
    Closes-Bug: #1466305
    Change-Id: I264493172da20b664df571e32876030246c2a87c

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

Change abandoned by Feodor Tersin (<email address hidden>) on branch: master
Review: https://review.openstack.org/196569

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

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/213308

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/kilo)

Reviewed: https://review.openstack.org/213308
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8794b938dcb983b7c918718807c2396cb255b4ce
Submitter: Jenkins
Branch: stable/kilo

commit 8794b938dcb983b7c918718807c2396cb255b4ce
Author: Matthew Booth <email address hidden>
Date: Wed Jul 22 14:56:52 2015 +0100

    Don't check flavor disk size when booting from volume

    When creating a volume from an image, cinder copies the image metadata
    into volume properties. When booting from the volume, we read this
    metadata from the volume and use it as image metadata once again.

    While fixing the check against min_ram,
    change I861a78b5c7efa71e4bf7206d388b8d0d8048c78e introduced a
    regression which prevents a user from booting a volume which is larger
    than the flavor's disk. As we are not creating this disk, this check
    does not make sense. Similarly, it checks the image metadata's
    min_disk against the flavor disk size, which is not being used.

    This change leaves the image metadata check unaltered when creating a
    flavor disk. When booting from a volume, we check min_disk from image
    metadata against the actual size of the volume. We don't check the
    volume size at all. The check against min_ram is retained unaltered.

    Closes-Bug: #1457517
    Closes-Bug: #1459491
    Closes-Bug: #1466305
    Change-Id: I264493172da20b664df571e32876030246c2a87c
    (cherry picked from commit 642c986f0636d52a9ba279c87e25082b4aa9b3b8)

tags: added: in-stable-kilo
Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-3 → 12.0.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.