Root device size is not consistent with flavor

Bug #1380493 reported by Luo Gangyi
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Low
Unassigned

Bug Description

If we choose "boot from image" and the image is a file, we will get an instance with a local disk. The size of the local disk equals the flavor.
If we choose "boot from image(create new volume)", we will get an instance with a volume. The size of the volume equals the size we inputed in Dashboard.

However, if we choose "boot from image" and the image is a snapshot, we will get an instance with a volume. And the size of the volume equals the size of snapshot instead of the size of flavor.

I am not sure whether it is a bug or it is designed intentionally. But I believe making the size of volume being consistent with flavor is better in that situation.

How to reproduce:
1. Using "boot from image(create new volume)" to create a new volume-backed instance.
2. Taking a snapshot of this volume-backed instance. This operation will add a snapshot-based image in Glance.
3. Using "boot from image" and choosing the snapshot-based image which created before. We will get volume-backed Instance.
 And the size of the root device(a volume) equals to the size of shapshot instead of the size of flavor.

This problem exists in both Icehouse and Juno. I uploaded two patch to fix this problem.
However, as Andrew Laski (alaski) commented that "the size of the volume has no relation to the disk size of the flavor being used". It is confusing. In my solution, I simply use the size defined in flavor as the size volume when user doesn't give the size of volume specifically.

Tags: volumes
Joe Gordon (jogo)
tags: added: volumes
Revision history for this message
Matt Riedemann (mriedem) wrote :

Which version of the code are you using, because this might already fix your issue:

https://github.com/openstack/nova/commit/2ee0d651b18a5840033f9338f3b605b5a64769f1

That's the fix for bug 1375478.

Joe Gordon (jogo)
Changed in nova:
status: New → Incomplete
Revision history for this message
Andrew Laski (alaski) wrote :

I'm not sure if this was designed intentionally, but it's non-obvious behavior and in my opinion is a design flaw. If you boot from a volume, whether it's from an image or from a volume snapshot, the size of the volume has no relation to the disk size of the flavor being used. This is confusing, but fixing this issue is going to require some rethinking on flavors and block device mappings.

Luo Gangyi (luogangyi)
description: updated
Changed in nova:
status: Incomplete → New
Luo Gangyi (luogangyi)
Changed in nova:
assignee: nobody → Luo Gangyi (luogangyi)
Luo Gangyi (luogangyi)
Changed in nova:
status: New → In Progress
Revision history for this message
Luo Gangyi (luogangyi) wrote :

see the patch I uploaded: https://review.openstack.org/#/c/128497

Luo Gangyi (luogangyi)
Changed in nova:
status: In Progress → Fix Committed
Luo Gangyi (luogangyi)
Changed in nova:
status: Fix Committed → In Progress
Revision history for this message
Alex Xu (xuhj) wrote :

This doesn't sound like a bug. Nova boot instance with image specified bdm, that also mean 'boot from volume'.

Revision history for this message
Vincent Hou (houshengbo) wrote :

I suggest we add a parameter to give the user the flexibility to input the size.
If the user does not enter it, then we pick up a proper size from the backend.

Changed in nova:
importance: Undecided → Low
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

There is no review in progress, so setting the status to "Confirmed"

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

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/128497
Reason: This patch has been stalled for a long time, so I am abandoning it. Please feel free to restore it when the code is ready for review.

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

The review [1] has multiple comments which doubt that this is a
genuine bug (though it seems to be an unexpected behavior). I also
didn't find a ML discussion about possible action items which allow
progress, that's why I'm closing this report.

If you want to work on this, consider discussing the possible action
items on the ML first.

References:
[1] https://review.openstack.org/#/c/128497

Changed in nova:
status: Confirmed → Opinion
assignee: Luo Gangyi (luogangyi) → nobody
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.