]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-volume: close encrypted device using name not path when zapping
authorIgor Fedotov <igor.fedotov@croit.io>
Thu, 9 Mar 2023 13:30:56 +0000 (16:30 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Tue, 8 Aug 2023 10:46:13 +0000 (13:46 +0300)
Just a tiny cleanup.

Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
(cherry picked from commit ebc335def0b32d1ecfe93fcfa286ddf460f136a1)

src/ceph-volume/ceph_volume/devices/lvm/zap.py

index 2f6e00f8774986936fc2a135ef7f184d7539440c..d4d78ad0181094c6fb4375c47d1252a065ccddaa 100644 (file)
@@ -302,9 +302,8 @@ class Zap(object):
         self.zap(devices)
 
     def dmcrypt_close(self, dmcrypt_uuid):
-        dmcrypt_path = "/dev/mapper/{}".format(dmcrypt_uuid)
-        mlogger.info("Closing encrypted path %s", dmcrypt_path)
-        encryption.dmcrypt_close(dmcrypt_path)
+        mlogger.info("Closing encrypted volume %s", dmcrypt_uuid)
+        encryption.dmcrypt_close(mapping=dmcrypt_uuid, skip_path_check=True)
 
     def main(self):
         sub_command_help = dedent("""