Snapshots of volume backed instances default to qcow2

Bug #1818851 reported by eblock@nde.ag
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Undecided
Unassigned
Glance
New
Undecided
Unassigned

Bug Description

This report applies to a production Ocata cloud and also to a Rocky lab environment.
I'm not entirely sure which component is responsible exactly but the inconsistency is strongly related to glance.

This report results from a mailing list thread I started in October 2018 [1], I only could put the pieces together step by step as some of the behavior was not reproducible, so this took a while, and my conclusion is summed up in [2]. I'll recap here:

The backend for nova, cinder and glance is ceph.

1. Creating an instance from a (regular) glance image with 'disk_format = qcow2' results in a "flat" nova instance with no parent data. Although a snapshot seems to create a "raw" image it's actually "qcow2", resulting in more flat images if instances are launched from this new image.

2. Creating a snapshot of a volume based nova instance (raw format) unexpectedly
results in a glance image with 'disk_format = qcow2'.
But launching a new instance from that snapshot does *not* result in a flat image as I
would have expected because of 1. Instead the new instance is a cow-clone of the original volume, which in fact is expected because of the ceph backend.

So the workflow seems fine, but I find it very confusing (obviously) that the volume based snapshot is declared as a qcow2 image, that doesn't seem right.

Steps to reproduce (part I):

1. Create qcow2 image.
2. Launch instance from qcow2 image.
3. Instance has no parent data, it's a flat rbd image without 'parent data'.

Steps to reproduce (part II):

1. Create raw image.
2. Launch volume backed instance from raw image.
3. Create snapshot of instance, resulting in a glance image with 'disk_format = qcow2'.
4. Launch instance from that image, results in a new copy-on-write clone (volume).

Expected result:
Snapshot of a volume backed instance should also have 'disk_format=raw'.
The consequences of the image property 'disk_format' should always be the same, no matter how the image was created.

Actual result:
Depending on the image creation the same property 'disk_format' has different effects on the ceph backend and the resulting usability.

[1] https://<email address hidden>/msg20935.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003383.html

eblock@nde.ag (eblock)
summary: - Snapshots default to qcow2
+ Snapshots of volume backed instances default to qcow2
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.