During the creation of a volume from Rocky linux image in QCOW2 format, the size reported by cinder differs from what the user has requested.
Backend used for this operation: Dell PowerMax
Steps to reproduce the issue:
- openstack volume create --size 30 --image <RockyImageName> <VolumeName>
the size shown by cinder is 30GB, then drops to 10GB (Rocky image virtual size) during the download, and then goes up to 30GB at the end of the process.
From the cinder logs, we can see the following:
- Initial ask confirmed (30GB volume)
Volume 1a571dce-5b4d-4e8f-aeb1-6b90b16800c6: being created as image with specification: {'status': 'creating', 'volume_name': 'volume-1a571dce-5b4d-4e8f-aeb1-6b90b16800c6', 'volume_size': 30, 'image_id': '055c2c86-35d2-44d8-9848-f2904bf730fd', 'image_location': (None, None), 'image_meta': {'name': 'Rocky-9-GenericCloud', 'disk_format': 'qcow2', 'container_format': 'bare', 'visibility': 'shared', 'size': 1083965440, 'virtual_size': 10737418240, 'status': 'active', 'checksum': '48cdeb033364af5909e15ee48d0e144d', 'protected': False, 'min_ram': 0, 'min_disk': 0, 'owner': 'bb953d148bfb4a8f964e1cb0d8ef98de', 'os_hidden': False, 'os_hash_algo': 'sha512', 'os_hash_value': '0499f1e4d8e33b9b2e4a73fcffe48595b9958943be87ae2234e5a75bf38fe0f40803a7cf5aff7283c381127d089bcc93bdfb55ba9ed2534092286607a60ba8c3', 'id': '055c2c86-35d2-44d8-9848-f2904bf730fd', 'created_at': datetime.datetime(2024, 4, 25, 8, 28, 57, tzinfo=datetime.timezone.utc), 'updated_at': datetime.datetime(2024, 4, 25, 8, 29, 44, tzinfo=datetime.timezone.utc), 'tags': [], 'file': '/v2/images/055c2c86-35d2-44d8-9848-f2904bf730fd/file', 'properties': {'owner_specified.openstack.md5': '', 'owner_specified.openstack.object': 'images/Rocky-9-GenericCloud', 'owner_specified.openstack.sha256': ''}}, 'image_service': <cinder.image.glance.GlanceImageService object at 0x7faf6fd57520>}
- Then cinder shows the volume as 10GB while 30GB is created on the backend
+--------------------------------+------------------------------------------------+
Apr 29 13:57:53 dldv2134 cinder-volume[880176]: | Key | Value |
Apr 29 13:57:53 dldv2134 cinder-volume[880176]: |--------------------------------+------------------------------------------------|
Apr 29 13:57:53 dldv2134 cinder-volume[880176]: | volume_id | 1a571dce-5b4d-4e8f-aeb1-6b90b16800c6 |
Apr 29 13:57:53 dldv2134 cinder-volume[880176]: | successful_operation | create |
Apr 29 13:57:53 dldv2134 cinder-volume[880176]: | volume_size | 10 |
Apr 29 13:57:53 dldv2134 cinder-volume[880176]: | device_id | 0055A |
...
Then finally the volume is shown as 30GB size (failure is happening because of something not related)
| 1a571dce-5b4d-4e8f-aeb1-6b90b16800c6 | None | error | 30 | |