]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: fix dmcrypt activation regression 60727/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Wed, 13 Nov 2024 15:23:36 +0000 (16:23 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Wed, 13 Nov 2024 15:23:36 +0000 (16:23 +0100)
`ceph.with_tpm` tag is actually a `str`, which means that
`bool('0')` will return `True`.

Fixes: https://tracker.ceph.com/issues/68944
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/ceph-volume/ceph_volume/objectstore/lvmbluestore.py

index ba3719cd3f3b7618dac31ce41c6fd477ba28ebd3..aa11d5537230f9596f520164583437d430264191 100644 (file)
@@ -367,7 +367,7 @@ class LvmBlueStore(BlueStore):
         if is_encrypted:
             osd_lv_path = '/dev/mapper/%s' % osd_block_lv.__dict__['lv_uuid']
             lockbox_secret = osd_block_lv.tags['ceph.cephx_lockbox_secret']
-            self.with_tpm = bool(osd_block_lv.tags.get('ceph.with_tpm', 0))
+            self.with_tpm = osd_block_lv.tags.get('ceph.with_tpm') == '1'
             if not self.with_tpm:
                 encryption_utils.write_lockbox_keyring(osd_id,
                                                        osd_fsid,