# 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.
- info_device = [info for info in info_devices if info['NAME'] == dev][0]
+ matched_info_devices = [info for info in info_devices if info['NAME'] == dev]
+ if not matched_info_devices:
+ logger.warning('device {} does not exist'.format(dev))
+ continue
+ info_device = matched_info_devices[0]
if 'PKNAME' in info_device and info_device['PKNAME'] != "":
parent = info_device['PKNAME']
try: