]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-volume: close encrypted volumes on deactivate
authorIgor Fedotov <igor.fedotov@croit.io>
Thu, 9 Mar 2023 13:29:55 +0000 (16:29 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Tue, 8 Aug 2023 10:46:13 +0000 (13:46 +0300)
Fixes: https://tracker.ceph.com/issues/58943
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
(cherry picked from commit d8f163d1f55d8234824e57fc6f851db9292fa972)

src/ceph-volume/ceph_volume/devices/lvm/deactivate.py
src/ceph-volume/ceph_volume/tests/devices/lvm/test_deactivate.py

index 46846a1dcbede5d8dfcf5cbc694252a69365d28b..0cc8d71ae64d1cc259d583665724b2bf65b61893 100644 (file)
@@ -28,7 +28,7 @@ def deactivate_osd(osd_id=None, osd_uuid=None):
 
     for lv in lvs:
         if lv.tags.get('ceph.encrypted', '0') == '1':
-            encryption.dmcrypt_close(lv.lv_uuid)
+            encryption.dmcrypt_close(mapping=lv.lv_uuid, skip_path_check=True)
 
 
 class Deactivate(object):
index 4b8304ce6a9996ebc564086209fd03c4aee83384..044fd35196fdf716f0e7ac530716b3a0f48dd5ad 100644 (file)
@@ -56,4 +56,4 @@ class TestDeactivate(object):
         p_get_lvs.return_value = [FooVolume]
 
         deactivate.deactivate_osd(0)
-        p_dm_close.assert_called_with('123')
+        p_dm_close.assert_called_with(mapping='123', skip_path_check=True)