Bug 1794249
Summary: | cinder retype(with migration) from unencrypted to encrypted volume type in Ceph backend fails because of encryption header takes more space. | ||
---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Shatadru Bandyopadhyay <sbandyop> |
Component: | python-os-brick | Assignee: | Cinder Bugs List <cinder-bugs> |
Status: | CLOSED MIGRATED | QA Contact: | Evelina Shames <eshames> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 17.0 (Wallaby) | CC: | apevec, eharney, gcharot, gfidente, jobernar, jschluet, jveiraca, lhh, ltoscano, pgrist, shtiwari, udesale |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2024-01-05 09:36:16 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1931621 |
Description
Shatadru Bandyopadhyay
2020-01-23 03:50:06 UTC
encrypted volume creation in ceph backend works fine. (overcloud) [stack@undercloud-0 ~]$ openstack volume create --size 1 --type LuksEncryptor-Template-256 'Encrypted-Test-Volume' +---------------------+--------------------------------------+ | Field | Value | +---------------------+--------------------------------------+ | attachments | [] | | availability_zone | nova | | bootable | false | | consistencygroup_id | None | | created_at | 2020-01-23T04:00:00.000000 | | description | None | | encrypted | True | | id | 300e44af-bd71-4bf5-b0d4-aa97928892c5 | | migration_status | None | | multiattach | False | | name | Encrypted-Test-Volume | | properties | | | replication_status | None | | size | 1 | | snapshot_id | None | | source_volid | None | | status | creating | | type | LuksEncryptor-Template-256 | | updated_at | None | | user_id | f9ca5a979d024d58aba8804b29f9c804 | +---------------------+--------------------------------------+ (overcloud) [stack@undercloud-0 ~]$ openstack volume show 'Encrypted-Test-Volume' +--------------------------------+--------------------------------------+ | Field | Value | +--------------------------------+--------------------------------------+ | attachments | [] | | availability_zone | nova | | bootable | false | | consistencygroup_id | None | | created_at | 2020-01-23T04:00:00.000000 | | description | None | | encrypted | True | | id | 300e44af-bd71-4bf5-b0d4-aa97928892c5 | | migration_status | None | | multiattach | False | | name | Encrypted-Test-Volume | | 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 | a578afa9dad2434182d053c07ffba4b8 | | properties | | | replication_status | None | | size | 1 | | snapshot_id | None | | source_volid | None | | status | available | | type | LuksEncryptor-Template-256 | | updated_at | 2020-01-23T04:00:19.000000 | | user_id | f9ca5a979d024d58aba8804b29f9c804 | +--------------------------------+--------------------------------------+ I have set volume_backend_name='tripleo_ceph' for `LuksEncryptor-Template-256` type. (overcloud) [stack@undercloud-0 ~]$ openstack volume type show LuksEncryptor-Template-256 +--------------------+--------------------------------------+ | Field | Value | +--------------------+--------------------------------------+ | access_project_ids | None | | description | None | | id | 151cec8d-7592-48b9-809d-32f9cad9b85c | | is_public | True | | name | LuksEncryptor-Template-256 | | properties | volume_backend_name='tripleo_ceph' | | qos_specs_id | None | +--------------------+--------------------------------------+ openstack secret list +------------------------------------------------------------------------+------+---------------------------+--------+-------------------------------------------+-----------+------------+-------------+------+------------+ | Secret href | Name | Created | Status | Content types | Algorithm | Bit length | Secret type | Mode | Expiration | +------------------------------------------------------------------------+------+---------------------------+--------+-------------------------------------------+-----------+------------+-------------+------+------------+ | http://10.0.0.103:9311/v1/secrets/11b71833-01dc-4177-8f2a-844a0666f77c | None | 2020-01-23T03:59:58+00:00 | ACTIVE | {u'default': u'application/octet-stream'} | aes | 256 | symmetric | None | None | | http://10.0.0.103:9311/v1/secrets/1b5b6150-2db0-416f-a44c-fdc33924892f | None | 2020-01-21T14:17:16+00:00 | ACTIVE | {u'default': u'application/octet-stream'} | aes | 256 | symmetric | None | None | | http://10.0.0.103:9311/v1/secrets/5aa0fe07-1a23-4e92-87f2-8268b6252ea8 | None | 2020-01-21T14:22:20+00:00 | ACTIVE | {u'default': u'application/octet-stream'} | aes | 256 | symmetric | None | None | | http://10.0.0.103:9311/v1/secrets/7128a241-dc3d-4e00-91ca-4cb82b333f9b | None | 2020-01-21T14:35:19+00:00 | ACTIVE | {u'default': u'application/octet-stream'} | aes | 256 | symmetric | None | None | | http://10.0.0.103:9311/v1/secrets/97ff5917-81c5-4eaf-a715-7f5c16827fd8 | None | 2020-01-21T14:25:27+00:00 | ACTIVE | {u'default': u'application/octet-stream'} | aes | 256 | symmetric | None | None | | http://10.0.0.103:9311/v1/secrets/bc6c77ac-48fc-417f-9979-34214f733dd0 | None | 2020-01-21T14:43:46+00:00 | ACTIVE | {u'default': u'application/octet-stream'} | aes | 256 | symmetric | None | None | +------------------------------------------------------------------------+------+---------------------------+--------+-------------------------------------------+-----------+------------+-------------+------+------------+ yet to narrow down but I see the 'connection_info' is wrong which us being passed to os.path.basename from log : ~~~ 2020-01-23 13:31:21.488 714897 DEBUG os_brick.initiator.connectors.rbd [req-8700d37b-b7ee-4d2d-b330-10edfe915e7c f9ca5a979d024d58aba8804b29f9c804 a578afa9dad2434182d053c07ffba4b8 - default default] ==> disconnect_volume: call u"{'connection_properties': {u'secret_type': u'ceph', 'device_path': <os_brick.initiator.linuxrbd.RBDVolumeIOWrapper object at 0x7fd3e710da90>, u'name': u'volumes/volume-872ad53b-3ca7-4b99-a913-4a1313a3715b', u'encrypted': True, u'keyring': None, u'cluster_name': u'ceph', u'secret_uuid': None, u'qos_specs': None, u'auth_enabled': True, u'hosts': [u'172.17.3.15', u'172.17.3.27', u'172.17.3.32'], u'volume_id': u'872ad53b-3ca7-4b99-a913-4a1313a3715b', u'discard': True, u'access_mode': u'rw', u'auth_username': u'openstack', u'ports': [u'6789', u'6789', u'6789']}, 'self': <os_brick.initiator.connectors.rbd.RBDConnector object at 0x7fd3e6fa6950>, 'force': True, 'device_info': {'path': <os_brick.initiator.linuxrbd.RBDVolumeIOWrapper object at 0x7fd3e710da90>}, 'ignore_errors': False}" trace_logging_wrapper /usr/lib/python2.7/site-packages/os_brick/utils.py:146 ~~~ Not sure why rbd has a device_path set and that to a object rather than a string. ~~~ 'device_path': <os_brick.initiator.linuxrbd.RBDVolumeIOWrapper object at 0x7fd3e710da90> ~~~ ~~~ (Pdb) connection_info['data']['device_path'] <os_brick.initiator.linuxrbd.RBDVolumeIOWrapper object at 0x7fba641df450> ~~~ and this object being passed to os.path.basename which is causing the error. 57 self.symlink_path = connection_info['data']['device_path'] 58 59 # a unique name for the volume -- e.g., the iSCSI participant name 60 self.dev_name = 'crypt-%s' % os.path.basename(self.symlink_path) < ---- |