@@ -88,18 +88,21 @@ 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 info_device ['TYPE' ] == 'lvm' :
93+ # lvm devices are not raw devices
94+ continue
95+ if 'PKNAME' in info_device and info_device ['PKNAME' ] != "" :
96+ parent = info_device ['PKNAME' ]
97+ try :
98+ if disk .has_bluestore_label (parent ):
99+ logger .warning (('ignoring child device {} whose parent {} is a BlueStore OSD.' .format (dev , parent ),
100+ 'device is likely a phantom Atari partition. device info: {}' .format (info_device )))
102101 continue
102+ except OSError as e :
103+ logger .error (('ignoring child device {} to avoid reporting invalid BlueStore data from phantom Atari partitions.' .format (dev ),
104+ 'failed to determine if parent device {} is BlueStore. err: {}' .format (parent , e )))
105+ continue
103106
104107 bs_info = _get_bluestore_info (dev )
105108 if bs_info is None :
0 commit comments