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.
Which version of the code are you using, because this might already fix your issue:
https:/ /github. com/openstack/ nova/commit/ 2ee0d651b18a584 0033f9338f3b605 b5a64769f1
That's the fix for bug 1375478.