]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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 09:54:41 +0000 (12:54 +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 708716e5e37a28b0240943dd02f1b7f8679ed2f4..94751f23f0b92272164f2b6a49ca6bda90f1d348 100644 (file)
@@ -303,9 +303,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("""