From ec119c19726359abf5c94c30b97ae18a24fefe7b Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Thu, 9 Mar 2023 16:29:55 +0300 Subject: [PATCH] ceph-volume: close encrypted volumes on deactivate Fixes: https://tracker.ceph.com/issues/58943 Signed-off-by: Igor Fedotov (cherry picked from commit d8f163d1f55d8234824e57fc6f851db9292fa972) --- src/ceph-volume/ceph_volume/devices/lvm/deactivate.py | 2 +- .../ceph_volume/tests/devices/lvm/test_deactivate.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ceph-volume/ceph_volume/devices/lvm/deactivate.py b/src/ceph-volume/ceph_volume/devices/lvm/deactivate.py index 46846a1dcbe..0cc8d71ae64 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/deactivate.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/deactivate.py @@ -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): diff --git a/src/ceph-volume/ceph_volume/tests/devices/lvm/test_deactivate.py b/src/ceph-volume/ceph_volume/tests/devices/lvm/test_deactivate.py index 4b8304ce6a9..044fd35196f 100644 --- a/src/ceph-volume/ceph_volume/tests/devices/lvm/test_deactivate.py +++ b/src/ceph-volume/ceph_volume/tests/devices/lvm/test_deactivate.py @@ -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) -- 2.39.5