Skip to content

Commit b3fd5b5

Browse files
committed
ceph-volume: fix broken workaround for atari partitions
broken by bea9f4b This commits fixes that regression. Fixes: https://tracker.ceph.com/issues/62001 Signed-off-by: Guillaume Abrioux <[email protected]>
1 parent 460e4bf commit b3fd5b5

File tree

1 file changed

+11
-11
lines changed
  • src/ceph-volume/ceph_volume/devices/raw

1 file changed

+11
-11
lines changed

src/ceph-volume/ceph_volume/devices/raw/list.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,18 @@ def generate(self, devs=None):
8888
# parent isn't bluestore, then the child could be a valid bluestore OSD. If we fail to
8989
# determine whether a parent is bluestore, we should err on the side of not reporting
9090
# the child so as not to give a false negative.
91-
for info_device in info_devices:
92-
if 'PKNAME' in info_device and info_device['PKNAME'] != "":
93-
parent = info_device['PKNAME']
94-
try:
95-
if disk.has_bluestore_label(parent):
96-
logger.warning(('ignoring child device {} whose parent {} is a BlueStore OSD.'.format(dev, parent),
97-
'device is likely a phantom Atari partition. device info: {}'.format(info_device)))
98-
continue
99-
except OSError as e:
100-
logger.error(('ignoring child device {} to avoid reporting invalid BlueStore data from phantom Atari partitions.'.format(dev),
101-
'failed to determine if parent device {} is BlueStore. err: {}'.format(parent, e)))
91+
info_device = [info for info in info_devices if info['NAME'] == dev][0]
92+
if 'PKNAME' in info_device and info_device['PKNAME'] != "":
93+
parent = info_device['PKNAME']
94+
try:
95+
if disk.has_bluestore_label(parent):
96+
logger.warning(('ignoring child device {} whose parent {} is a BlueStore OSD.'.format(dev, parent),
97+
'device is likely a phantom Atari partition. device info: {}'.format(info_device)))
10298
continue
99+
except OSError as e:
100+
logger.error(('ignoring child device {} to avoid reporting invalid BlueStore data from phantom Atari partitions.'.format(dev),
101+
'failed to determine if parent device {} is BlueStore. err: {}'.format(parent, e)))
102+
continue
103103

104104
bs_info = _get_bluestore_info(dev)
105105
if bs_info is None:

0 commit comments

Comments
 (0)