Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luminous ceph-volume util.encryption robust blkid+lsblk detection of lockbox #24981

Merged
merged 1 commit into from Nov 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/ceph-volume/ceph_volume/util/encryption.py
Expand Up @@ -3,6 +3,7 @@
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

Expand Down Expand Up @@ -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