summaryrefslogtreecommitdiffstats
path: root/src/ceph-volume/ceph_volume/devices/lvm/zap.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-23 16:45:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-23 16:45:44 +0000
commit17d6a993fc17d533460c5f40f3908c708e057c18 (patch)
tree1a3bd93e0ecd74fa02f93a528fe2f87e5314c4b5 /src/ceph-volume/ceph_volume/devices/lvm/zap.py
parentReleasing progress-linux version 18.2.2-0progress7.99u1. (diff)
downloadceph-17d6a993fc17d533460c5f40f3908c708e057c18.tar.xz
ceph-17d6a993fc17d533460c5f40f3908c708e057c18.zip
Merging upstream version 18.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/ceph-volume/ceph_volume/devices/lvm/zap.py')
-rw-r--r--src/ceph-volume/ceph_volume/devices/lvm/zap.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ceph-volume/ceph_volume/devices/lvm/zap.py b/src/ceph-volume/ceph_volume/devices/lvm/zap.py
index d4d78ad01..f512a3bde 100644
--- a/src/ceph-volume/ceph_volume/devices/lvm/zap.py
+++ b/src/ceph-volume/ceph_volume/devices/lvm/zap.py
@@ -10,6 +10,7 @@ from ceph_volume.api import lvm as api
from ceph_volume.util import system, encryption, disk, arg_validators, str_to_int, merge_dict
from ceph_volume.util.device import Device
from ceph_volume.systemd import systemctl
+from typing import List
logger = logging.getLogger(__name__)
mlogger = terminal.MultiLogger(__name__)
@@ -201,8 +202,11 @@ class Zap(object):
"""
if device.is_encrypted:
# find the holder
- holders = [
- '/dev/%s' % holder for holder in device.sys_api.get('holders', [])
+ pname = device.sys_api.get('parent')
+ devname = device.sys_api.get('devname')
+ parent_device = Device(f'/dev/{pname}')
+ holders: List[str] = [
+ f'/dev/{holder}' for holder in parent_device.sys_api['partitions'][devname]['holders']
]
for mapper_uuid in os.listdir('/dev/mapper'):
mapper_path = os.path.join('/dev/mapper', mapper_uuid)