File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/ceph-volume/ceph_volume/devices/raw Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,11 @@ 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- info_device = [info for info in info_devices if info ['NAME' ] == dev ][0 ]
91+ matched_info_devices = [info for info in info_devices if info ['NAME' ] == dev ]
92+ if not matched_info_devices :
93+ logger .warning ('device {} does not exist' .format (dev ))
94+ continue
95+ info_device = matched_info_devices [0 ]
9296 if 'PKNAME' in info_device and info_device ['PKNAME' ] != "" :
9397 parent = info_device ['PKNAME' ]
9498 try :
You can’t perform that action at this time.
0 commit comments