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

pacific: ceph-volume: fix raw list for lvm devices #52981

Merged
merged 2 commits into from Jan 22, 2024
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
25 changes: 14 additions & 11 deletions src/ceph-volume/ceph_volume/devices/raw/list.py
Expand Up @@ -88,18 +88,21 @@ def generate(self, devs=None):
# parent isn't bluestore, then the child could be a valid bluestore OSD. If we fail to
# determine whether a parent is bluestore, we should err on the side of not reporting
# the child so as not to give a false negative.
for info_device in info_devices:
if 'PKNAME' in info_device and info_device['PKNAME'] != "":
parent = info_device['PKNAME']
try:
if disk.has_bluestore_label(parent):
logger.warning(('ignoring child device {} whose parent {} is a BlueStore OSD.'.format(dev, parent),
'device is likely a phantom Atari partition. device info: {}'.format(info_device)))
continue
except OSError as e:
logger.error(('ignoring child device {} to avoid reporting invalid BlueStore data from phantom Atari partitions.'.format(dev),
'failed to determine if parent device {} is BlueStore. err: {}'.format(parent, e)))
info_device = [info for info in info_devices if info['NAME'] == dev][0]
if info_device['TYPE'] == 'lvm':
# lvm devices are not raw devices
continue
if 'PKNAME' in info_device and info_device['PKNAME'] != "":
parent = info_device['PKNAME']
try:
if disk.has_bluestore_label(parent):
logger.warning(('ignoring child device {} whose parent {} is a BlueStore OSD.'.format(dev, parent),
'device is likely a phantom Atari partition. device info: {}'.format(info_device)))
continue
except OSError as e:
logger.error(('ignoring child device {} to avoid reporting invalid BlueStore data from phantom Atari partitions.'.format(dev),
'failed to determine if parent device {} is BlueStore. err: {}'.format(parent, e)))
continue

bs_info = _get_bluestore_info(dev)
if bs_info is None:
Expand Down