@@ -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