Bug 2132223
| Summary: | Cinder doesn't fail while creating encrypted volume from image which won't fit to the volume after encryption. | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Rafal Szmigiel <rszmigie> |
| Component: | openstack-cinder | Assignee: | Cinder Bugs List <cinder-bugs> |
| Status: | CLOSED DUPLICATE | QA Contact: | Tzach Shefi <tshefi> |
| Severity: | high | Docs Contact: | Andy Stillman <astillma> |
| Priority: | unspecified | ||
| Version: | 16.2 (Train) | CC: | eharney |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-10-10 18:39:15 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This is the same issue that is being worked in bug 1936564. *** This bug has been marked as a duplicate of bug 1936564 *** |
Description of problem: During the PoC I've been testing booting instance from encrypted Cinder volume. ################################################################################ I've been using Fedora 36 RAW image: $ qemu-img info Fedora-Cloud-Base-36-1.5.x86_64.raw image: Fedora-Cloud-Base-36-1.5.x86_64.raw file format: raw virtual size: 5 GiB (5368709120 bytes) disk size: 1.6 GiB $ sha256sum Fedora-Cloud-Base-36-1.5.x86_64.raw fa1f910ceebfc2662262a1080dcd831ae96838760df8a49fa9bf6e8e0d54ae0f Fedora-Cloud-Base-36-1.5.x86_64.raw ################################################################################ uploaded to glance: $ openstack image show 9dbcd22d-40e9-44ed-a607-95f1c2830025 +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | checksum | 78d5e816a0bd4cc4a67498b1527beb2f | | container_format | bare | | created_at | 2022-10-04T10:35:13Z | | disk_format | raw | | file | /v2/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/file | | id | 9dbcd22d-40e9-44ed-a607-95f1c2830025 | | min_disk | 2 | | min_ram | 1024 | | name | Fedora 36 | | owner | 46cd9e92bed940ea8ffa08b5c8e8a16a | | properties | direct_url='rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', locations='[{'url': 'rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', 'metadata': {'store': 'default_backend'}}]', os_hash_algo='sha512', os_hash_value='24e381e0156b114b4c3ccfa4c3a4e7cb91c17045a02cc7d70678f6f3f16d7ec9ca48e1c7526b1cd733e8c1f01bb36a3b26484b4d1077d1b130000c9afe0f6c06', os_hidden='False', stores='default_backend' | | protected | False | | schema | /v2/schemas/image | | size | 5368709120 | | status | active | | tags | | | updated_at | 2022-10-04T10:36:01Z | | virtual_size | None | | visibility | public | +------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ################################################################################ to create encrypted volume: +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | attachments | [{'id': 'a773f683-3113-455b-907f-c49049e9f448', 'attachment_id': '09a372fe-d654-4de4-85cc-60388d42eef1', 'volume_id': 'a773f683-3113-455b-907f-c49049e9f448', 'server_id': '3e445079-3072-437c-a1e3-ab9b647925c6', 'host_name': 'overcloud-novacompute-1.rhosp-poc.rfclient.hu', 'device': '/dev/vdb', 'attached_at': '2022-10-04T13:18:33.000000'}] | | availability_zone | nova | | bootable | true | | consistencygroup_id | None | | created_at | 2022-10-04T13:16:55.000000 | | description | | | encrypted | True | | id | a773f683-3113-455b-907f-c49049e9f448 | | migration_status | None | | multiattach | False | | name | Fedora 36 Encrypted 4 | | os-vol-host-attr:host | hostgroup@tripleo_ceph#tripleo_ceph | | os-vol-mig-status-attr:migstat | None | | os-vol-mig-status-attr:name_id | None | | os-vol-tenant-attr:tenant_id | 46cd9e92bed940ea8ffa08b5c8e8a16a | | properties | | | replication_status | None | | size | 5 | | snapshot_id | None | | source_volid | None | | status | in-use | | type | LuksEncryptor-Template-256 | | updated_at | 2022-10-04T13:18:37.000000 | | user_id | 3c1301ee1ea742988516304271e8ccf3 | | volume_image_metadata | {'signature_verified': 'False', 'image_id': '9dbcd22d-40e9-44ed-a607-95f1c2830025', 'image_name': 'Fedora 36', 'checksum': '78d5e816a0bd4cc4a67498b1527beb2f', 'container_format': 'bare', 'disk_format': 'raw', 'min_disk': '2', 'min_ram': '1024', 'size': '5368709120'} | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ################################################################################ However server created from this volume never did boot. To troubleshoot it further I've booted VM from unencrypted volume with the same size (5GB) and it was successful: +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | attachments | [{'id': '6bcd8f12-2e2f-4339-977a-9cadecb37918', 'attachment_id': '53bca12e-8c7a-4899-a3c8-30cae2016e4e', 'volume_id': '6bcd8f12-2e2f-4339-977a-9cadecb37918', 'server_id': '3e445079-3072-437c-a1e3-ab9b647925c6', 'host_name': 'overcloud-novacompute-1.rhosp-poc.rfclient.hu', 'device': '/dev/vda', 'attached_at': '2022-10-04T12:02:12.000000'}] | | availability_zone | nova | | bootable | true | | consistencygroup_id | None | | created_at | 2022-10-04T12:02:08.000000 | | description | | | encrypted | False | | id | 6bcd8f12-2e2f-4339-977a-9cadecb37918 | | migration_status | None | | multiattach | False | | name | | | os-vol-host-attr:host | hostgroup@tripleo_ceph#tripleo_ceph | | os-vol-mig-status-attr:migstat | None | | os-vol-mig-status-attr:name_id | None | | os-vol-tenant-attr:tenant_id | 46cd9e92bed940ea8ffa08b5c8e8a16a | | properties | | | replication_status | None | | size | 5 | | snapshot_id | None | | source_volid | None | | status | in-use | | type | tripleo | | updated_at | 2022-10-04T12:02:12.000000 | | user_id | 3c1301ee1ea742988516304271e8ccf3 | | volume_image_metadata | {'image_id': '9dbcd22d-40e9-44ed-a607-95f1c2830025', 'image_name': 'Fedora 36', 'checksum': '78d5e816a0bd4cc4a67498b1527beb2f', 'container_format': 'bare', 'disk_format': 'raw', 'min_disk': '2', 'min_ram': '1024', 'size': '5368709120'} | +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ################################################################################ Then I created more encrypted and unencrypted volumes with 5 and 10GB sizes and mounted them to that vm: $ openstack volume list +--------------------------------------+-----------------------+--------+------+------------------------------------------------+ | ID | Name | Status | Size | Attached to | +--------------------------------------+-----------------------+--------+------+------------------------------------------------+ | 8f8f55f9-e83a-418c-a2bd-b76a8afb5530 | Fedora 36 UnEncrypted | in-use | 5 | Attached to rafal-test-02-1 on /dev/vdd | | 28053111-14bb-4b87-91df-7f3c54c0a249 | Fedora 36 Encrypted 5 | in-use | 10 | Attached to rafal-test-02-1 on /dev/vdc | | a773f683-3113-455b-907f-c49049e9f448 | Fedora 36 Encrypted 4 | in-use | 5 | Attached to rafal-test-02-1 on /dev/vdb | | 6bcd8f12-2e2f-4339-977a-9cadecb37918 | | in-use | 5 | Attached to rafal-test-02-1 on /dev/vda | +--------------------------------------+-----------------------+--------+------+------------------------------------------------+ ################################################################################ Inside VM I can observe that encrypted 5GB volume (vdb) is not correct, while encrypted 10GB (vdc) and unencrypted 5GB (vda, vdd) volumes are ok. Please note difference in number of sectors for 5GB encrypted (vdb) and 5GB unencrypted (vda, vdd) volumes: Disk /dev/vda: 5 GiB, 5368709120 bytes, 10485760 sectors Disk /dev/vdb: 5 GiB, 5366640640 bytes, 10481720 sectors Disk /dev/vdd: 5 GiB, 5368709120 bytes, 10485760 sectors ################################################################################ Full fdisk -l output: [root@rafal-test-02-1 ~]# fdisk -l Disk /dev/vda: 5 GiB, 5368709120 bytes, 10485760 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: BF6BA5C6-0688-4AB6-B09C-942136A8C104 Device Start End Sectors Size Type /dev/vda1 2048 4095 2048 1M BIOS boot /dev/vda2 4096 2052095 2048000 1000M Linux filesystem /dev/vda3 2052096 2256895 204800 100M EFI System /dev/vda4 2256896 2265087 8192 4M PowerPC PReP boot /dev/vda5 2265088 10483711 8218624 3.9G Linux filesystem Disk /dev/zram0: 1.92 GiB, 2065694720 bytes, 504320 sectors Units: sectors of 1 * 4096 = 4096 bytes Sector size (logical/physical): 4096 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes GPT PMBR size mismatch (10485759 != 10481719) will be corrected by write. Disk /dev/vdb: 5 GiB, 5366640640 bytes, 10481720 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000 Device Boot Start End Sectors Size Id Type /dev/vdb1 1 10481719 10481719 5G ee GPT GPT PMBR size mismatch (10485759 != 20967479) will be corrected by write. The backup GPT table is not on the end of the device. Disk /dev/vdc: 10 GiB, 10735349760 bytes, 20967480 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: BF6BA5C6-0688-4AB6-B09C-942136A8C104 Device Start End Sectors Size Type /dev/vdc1 2048 4095 2048 1M BIOS boot /dev/vdc2 4096 2052095 2048000 1000M Linux filesystem /dev/vdc3 2052096 2256895 204800 100M EFI System /dev/vdc4 2256896 2265087 8192 4M PowerPC PReP boot /dev/vdc5 2265088 10483711 8218624 3.9G Linux filesystem Disk /dev/vdd: 5 GiB, 5368709120 bytes, 10485760 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: BF6BA5C6-0688-4AB6-B09C-942136A8C104 Device Start End Sectors Size Type /dev/vdd1 2048 4095 2048 1M BIOS boot /dev/vdd2 4096 2052095 2048000 1000M Linux filesystem /dev/vdd3 2052096 2256895 204800 100M EFI System /dev/vdd4 2256896 2265087 8192 4M PowerPC PReP boot /dev/vdd5 2265088 10483711 8218624 3.9G Linux filesystem ################################################################################ LUKS encryption takes some disk space for itself hence the available encrypted disk size is smaller compared to the same size of unencrypted disk. That's seems to be legit but why cinder-volume didn't fail? [root@overcloud-controller-2 cinder]# grep 28053111-14bb-4b87-91df-7f3c54c0a249 cinder-volume.log.1 2022-10-04 13:20:28.795 50 DEBUG cinder.volume.manager [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] Task 'cinder.volume.flows.manager.create_volume.ExtractVolumeRefTask;volume:create' (4d2472c5-855f-4bd3-96b5-1a4fcd403cba) transitioned into state 'SUCCESS' from state 'RUNNING' with result 'Volume(_name_id=None,admin_metadata={},attach_status='detached',availability_zone='nova',bootable=False,cluster=<?>,cluster_name=None,consistencygroup=<?>,consistencygroup_id=None,created_at=2022-10-04T13:20:28Z,deleted=False,deleted_at=None,display_description='',display_name='Fedora 36 Encrypted 5',ec2_id=None,encryption_key_id=e590b8ce-c1e2-44fc-88e8-ef91f4c76065,glance_metadata=<?>,group=<?>,group_id=None,host='hostgroup@tripleo_ceph#tripleo_ceph',id=28053111-14bb-4b87-91df-7f3c54c0a249,launched_at=None,metadata={},migration_status=None,multiattach=False,previous_status=None,project_id='46cd9e92bed940ea8ffa08b5c8e8a16a',provider_auth=None,provider_geometry=None,provider_id=None,provider_location=None,replication_driver_data=None,replication_extended_status=None,replication_status=None,scheduled_at=2022-10-04T13:20:28Z,service_uuid=None,shared_targets=True,size=10,snapshot_id=None,snapshots=<?>,source_volid=None,status='creating',terminated_at=None,updated_at=2022-10-04T13:20:28Z,user_id='3c1301ee1ea742988516304271e8ccf3',volume_attachment=<?>,volume_type=VolumeType(509ebf1c-6707-4910-89dc-5b6cd7608a63),volume_type_id=509ebf1c-6707-4910-89dc-5b6cd7608a63)' _task_receiver /usr/lib/python3.6/site-packages/taskflow/listeners/logging.py:183 2022-10-04 13:20:28.836 50 DEBUG cinder.volume.manager [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] Task 'cinder.volume.flows.manager.create_volume.ExtractVolumeSpecTask;volume:create' (26681b0b-9a1d-495c-a3db-de79843d437e) transitioned into state 'SUCCESS' from state 'RUNNING' with result '{'status': 'creating', 'type': 'image', 'volume_id': '28053111-14bb-4b87-91df-7f3c54c0a249', 'volume_name': 'volume-28053111-14bb-4b87-91df-7f3c54c0a249', 'volume_size': 10, 'image_id': '9dbcd22d-40e9-44ed-a607-95f1c2830025', 'image_location': ('rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', [{'url': 'rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', 'metadata': {'store': 'default_backend'}}]), 'image_meta': {'name': 'Fedora 36', 'disk_format': 'raw', 'container_format': 'bare', 'visibility': 'public', 'size': 5368709120, 'virtual_size': None, 'status': 'active', 'checksum': '78d5e816a0bd4cc4a67498b1527beb2f', 'protected': False, 'min_ram': 1024, 'min_disk': 2, 'owner': '46cd9e92bed940ea8ffa08b5c8e8a16a', 'os_hidden': False, 'os_hash_algo': 'sha512', 'os_hash_value': '24e381e0156b114b4c3ccfa4c3a4e7cb91c17045a02cc7d70678f6f3f16d7ec9ca48e1c7526b1cd733e8c1f01bb36a3b26484b4d1077d1b130000c9afe0f6c06', 'id': '9dbcd22d-40e9-44ed-a607-95f1c2830025', 'created_at': datetime.datetime(2022, 10, 4, 10, 35, 13, tzinfo=datetime.timezone.utc), 'updated_at': datetime.datetime(2022, 10, 4, 10, 36, 1, tzinfo=datetime.timezone.utc), 'locations': [{'url': 'rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', 'metadata': {'store': 'default_backend'}}], 'direct_url': 'rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', 'tags': [], 'file': '/v2/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/file', 'stores': 'default_backend', 'properties': {}}, 'image_service': <cinder.image.glance.GlanceImageService object at 0x7f063f2da198>}' _task_receiver /usr/lib/python3.6/site-packages/taskflow/listeners/logging.py:183 2022-10-04 13:20:28.838 50 INFO cinder.volume.flows.manager.create_volume [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] Volume 28053111-14bb-4b87-91df-7f3c54c0a249: being created as image with specification: {'status': 'creating', 'volume_name': 'volume-28053111-14bb-4b87-91df-7f3c54c0a249', 'volume_size': 10, 'image_id': '9dbcd22d-40e9-44ed-a607-95f1c2830025', 'image_location': ('rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', [{'url': 'rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', 'metadata': {'store': 'default_backend'}}]), 'image_meta': {'name': 'Fedora 36', 'disk_format': 'raw', 'container_format': 'bare', 'visibility': 'public', 'size': 5368709120, 'virtual_size': None, 'status': 'active', 'checksum': '78d5e816a0bd4cc4a67498b1527beb2f', 'protected': False, 'min_ram': 1024, 'min_disk': 2, 'owner': '46cd9e92bed940ea8ffa08b5c8e8a16a', 'os_hidden': False, 'os_hash_algo': 'sha512', 'os_hash_value': '24e381e0156b114b4c3ccfa4c3a4e7cb91c17045a02cc7d70678f6f3f16d7ec9ca48e1c7526b1cd733e8c1f01bb36a3b26484b4d1077d1b130000c9afe0f6c06', 'id': '9dbcd22d-40e9-44ed-a607-95f1c2830025', 'created_at': datetime.datetime(2022, 10, 4, 10, 35, 13, tzinfo=datetime.timezone.utc), 'updated_at': datetime.datetime(2022, 10, 4, 10, 36, 1, tzinfo=datetime.timezone.utc), 'locations': [{'url': 'rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', 'metadata': {'store': 'default_backend'}}], 'direct_url': 'rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', 'tags': [], 'file': '/v2/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/file', 'stores': 'default_backend', 'properties': {}}, 'image_service': <cinder.image.glance.GlanceImageService object at 0x7f063f2da198>} 2022-10-04 13:20:28.838 50 DEBUG cinder.volume.flows.manager.create_volume [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] Cloning 28053111-14bb-4b87-91df-7f3c54c0a249 from image 9dbcd22d-40e9-44ed-a607-95f1c2830025 at location ('rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', [{'url': 'rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', 'metadata': {'store': 'default_backend'}}]). _create_from_image /usr/lib/python3.6/site-packages/cinder/volume/flows/manager/create_volume.py:978 2022-10-04 13:20:51.426 50 DEBUG oslo_concurrency.processutils [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] Running cmd (subprocess): rbd import --pool volumes --order 22 /var/lib/cinder/conversion/tmpu3vzb6iv volume-28053111-14bb-4b87-91df-7f3c54c0a249 --id openstack --cluster ceph --conf /etc/ceph/ceph.conf execute /usr/lib/python3.6/site-packages/oslo_concurrency/processutils.py:379 2022-10-04 13:20:54.509 50 DEBUG oslo_concurrency.processutils [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] CMD "rbd import --pool volumes --order 22 /var/lib/cinder/conversion/tmpu3vzb6iv volume-28053111-14bb-4b87-91df-7f3c54c0a249 --id openstack --cluster ceph --conf /etc/ceph/ceph.conf" returned: 0 in 3.084s execute /usr/lib/python3.6/site-packages/oslo_concurrency/processutils.py:416 2022-10-04 13:20:54.856 50 DEBUG cinder.volume.volume_utils [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] Attempting download of 9dbcd22d-40e9-44ed-a607-95f1c2830025 (('rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', [{'url': 'rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', 'metadata': {'store': 'default_backend'}}])) to volume 28053111-14bb-4b87-91df-7f3c54c0a249. copy_image_to_volume /usr/lib/python3.6/site-packages/cinder/volume/volume_utils.py:1136 2022-10-04 13:21:06.395 50 DEBUG cinder.volume.drivers.rbd [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] Volume volume-28053111-14bb-4b87-91df-7f3c54c0a249 is not a clone. _get_clone_info /usr/lib/python3.6/site-packages/cinder/volume/drivers/rbd.py:1103 2022-10-04 13:21:06.398 50 DEBUG cinder.volume.drivers.rbd [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] deleting rbd volume volume-28053111-14bb-4b87-91df-7f3c54c0a249 delete_volume /usr/lib/python3.6/site-packages/cinder/volume/drivers/rbd.py:1215 2022-10-04 13:21:06.474 50 DEBUG oslo_concurrency.processutils [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] Running cmd (subprocess): rbd import --pool volumes --order 22 /var/lib/cinder/conversion/tmpno5_iepn volume-28053111-14bb-4b87-91df-7f3c54c0a249 --new-format --id openstack --cluster ceph --conf /etc/ceph/ceph.conf execute /usr/lib/python3.6/site-packages/oslo_concurrency/processutils.py:379 2022-10-04 13:21:15.215 50 DEBUG oslo_concurrency.processutils [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] CMD "rbd import --pool volumes --order 22 /var/lib/cinder/conversion/tmpno5_iepn volume-28053111-14bb-4b87-91df-7f3c54c0a249 --new-format --id openstack --cluster ceph --conf /etc/ceph/ceph.conf" returned: 0 in 8.741s execute /usr/lib/python3.6/site-packages/oslo_concurrency/processutils.py:416 2022-10-04 13:21:22.556 50 DEBUG cinder.volume.volume_utils [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] Downloaded image 9dbcd22d-40e9-44ed-a607-95f1c2830025 (('rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', [{'url': 'rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', 'metadata': {'store': 'default_backend'}}])) to volume 28053111-14bb-4b87-91df-7f3c54c0a249 successfully. copy_image_to_volume /usr/lib/python3.6/site-packages/cinder/volume/volume_utils.py:1176 2022-10-04 13:21:22.760 50 DEBUG cinder.volume.volume_utils [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] Marking volume 28053111-14bb-4b87-91df-7f3c54c0a249 as bootable. enable_bootable_flag /usr/lib/python3.6/site-packages/cinder/volume/volume_utils.py:1089 2022-10-04 13:21:22.764 50 DEBUG cinder.volume.flows.manager.create_volume [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] Copying metadata from image 9dbcd22d-40e9-44ed-a607-95f1c2830025 to 28053111-14bb-4b87-91df-7f3c54c0a249. _handle_bootable_volume_glance_meta /usr/lib/python3.6/site-packages/cinder/volume/flows/manager/create_volume.py:441 2022-10-04 13:21:22.764 50 DEBUG cinder.volume.flows.manager.create_volume [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] Creating volume glance metadata for volume 28053111-14bb-4b87-91df-7f3c54c0a249 backed by image 9dbcd22d-40e9-44ed-a607-95f1c2830025 with: {'image_id': '9dbcd22d-40e9-44ed-a607-95f1c2830025', 'image_name': 'Fedora 36', 'checksum': '78d5e816a0bd4cc4a67498b1527beb2f', 'container_format': 'bare', 'disk_format': 'raw', 'min_disk': 2, 'min_ram': 1024, 'size': 5368709120}. _capture_volume_image_metadata /usr/lib/python3.6/site-packages/cinder/volume/flows/manager/create_volume.py:656 2022-10-04 13:21:22.781 50 DEBUG cinder.volume.manager [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] Task 'cinder.volume.flows.manager.create_volume.CreateVolumeFromSpecTask;volume:create' (25d8c369-d7c1-4a68-bc39-0f5cad70e4ca) transitioned into state 'SUCCESS' from state 'RUNNING' with result '{'status': 'creating', 'volume_name': 'volume-28053111-14bb-4b87-91df-7f3c54c0a249', 'volume_size': 10, 'image_id': '9dbcd22d-40e9-44ed-a607-95f1c2830025', 'image_location': ('rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', [{'url': 'rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', 'metadata': {'store': 'default_backend'}}]), 'image_meta': {'name': 'Fedora 36', 'disk_format': 'raw', 'container_format': 'bare', 'visibility': 'public', 'size': 5368709120, 'virtual_size': None, 'status': 'active', 'checksum': '78d5e816a0bd4cc4a67498b1527beb2f', 'protected': False, 'min_ram': 1024, 'min_disk': 2, 'owner': '46cd9e92bed940ea8ffa08b5c8e8a16a', 'os_hidden': False, 'os_hash_algo': 'sha512', 'os_hash_value': '24e381e0156b114b4c3ccfa4c3a4e7cb91c17045a02cc7d70678f6f3f16d7ec9ca48e1c7526b1cd733e8c1f01bb36a3b26484b4d1077d1b130000c9afe0f6c06', 'id': '9dbcd22d-40e9-44ed-a607-95f1c2830025', 'created_at': datetime.datetime(2022, 10, 4, 10, 35, 13, tzinfo=datetime.timezone.utc), 'updated_at': datetime.datetime(2022, 10, 4, 10, 36, 1, tzinfo=datetime.timezone.utc), 'locations': [{'url': 'rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', 'metadata': {'store': 'default_backend'}}], 'direct_url': 'rbd://68edb5f3-67a1-459e-a55e-f06c31c3c776/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/snap', 'tags': [], 'file': '/v2/images/9dbcd22d-40e9-44ed-a607-95f1c2830025/file', 'stores': 'default_backend', 'properties': {}}, 'image_service': <cinder.image.glance.GlanceImageService object at 0x7f063f2da198>}' _task_receiver /usr/lib/python3.6/site-packages/taskflow/listeners/logging.py:183 2022-10-04 13:21:22.784 50 INFO cinder.volume.flows.manager.create_volume [req-3fdf3e55-3a95-4434-a40b-f34c5834ccc6 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] Volume volume-28053111-14bb-4b87-91df-7f3c54c0a249 (28053111-14bb-4b87-91df-7f3c54c0a249): created successfully 2022-10-04 13:21:33.612 50 DEBUG cinder.volume.drivers.rbd [req-e0b3baca-4907-4a35-a3da-9b57611c622e 3c1301ee1ea742988516304271e8ccf3 46cd9e92bed940ea8ffa08b5c8e8a16a - default default] connection data: {'driver_volume_type': 'rbd', 'data': {'name': 'volumes/volume-28053111-14bb-4b87-91df-7f3c54c0a249', 'hosts': ['172.16.1.37', '172.16.1.42', '172.16.1.91'], 'ports': ['6789', '6789', '6789'], 'cluster_name': 'ceph', 'auth_enabled': True, 'auth_username': 'openstack', 'secret_type': 'ceph', 'secret_uuid': '68edb5f3-67a1-459e-a55e-f06c31c3c776', 'volume_id': '28053111-14bb-4b87-91df-7f3c54c0a249', 'discard': True, 'keyring': None}} initialize_connection /usr/lib/python3.6/site-packages/cinder/volume/drivers/rbd.py:1510 Version-Release number of selected component (if applicable): How reproducible: All the time with the procedure above. Steps to Reproduce: 1. 2. 3. Actual results: Cinder-volume creates broken, unusable encrypted volume with image too big to be deployed on it. Expected results: Cinder-volume fails to create the encrypted volume because image won't fit on it after encryption. or even better We check before if volume size is enough for image size + LUKS overhead. Additional info: