Skip to content

Commit

Permalink
ceph-volume: close encrypted device using name not path when zapping
Browse files Browse the repository at this point in the history
Just a tiny cleanup.

Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
  • Loading branch information
ifed01 committed Mar 9, 2023
1 parent 521c84b commit 744b52e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ceph-volume/ceph_volume/devices/lvm/zap.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,8 @@ def zap_osd(self):
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_by_name(dmcrypt_uuid)

def main(self):
sub_command_help = dedent("""
Expand Down

0 comments on commit 744b52e

Please sign in to comment.