mirror of
https://github.com/ceph/ceph
synced 2024-12-25 04:43:17 +00:00
ceph-volume util.encryption robust blkid+lsblk detection of lockbox
Signed-off-by: Alfredo Deza <adeza@redhat.com>
This commit is contained in:
parent
59db1dc303
commit
fc3e6ea3d9
@ -3,6 +3,7 @@ import os
|
||||
import logging
|
||||
from ceph_volume import process, conf
|
||||
from ceph_volume.util import constants, system
|
||||
from ceph_volume.util.device import Device
|
||||
from .prepare import write_keyring
|
||||
from .disk import lsblk, device_family, get_part_entry_type
|
||||
|
||||
@ -251,9 +252,9 @@ def legacy_encrypted(device):
|
||||
return metadata
|
||||
parent_device = disk_meta['PKNAME']
|
||||
# With the parent device set, we can now look for the lockbox listing associated devices
|
||||
devices = device_family(parent_device)
|
||||
for i in devices:
|
||||
if 'lockbox' in i.get('PARTLABEL', ''):
|
||||
metadata['lockbox'] = i['NAME']
|
||||
devices = [Device(i['NAME']) for i in device_family(parent_device)]
|
||||
for d in devices:
|
||||
if d.ceph_disk.type == 'lockbox':
|
||||
metadata['lockbox'] = d.abspath
|
||||
break
|
||||
return metadata
|
||||
|
Loading…
Reference in New Issue
Block a user