ceph: continue to get available devices if failed to get a device info

getAvailableDevices() should continue if something wrong happens in a device than returning
immediately with error.

Closes: https://github.com/rook/rook/issues/7543

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
This commit is contained in:
Satoru Takeuchi committed 2021-04-14 03:13:06 +00:00
1 parent 056150484f
commit a4fb080590
1 file changed
+2 -1
+2 -1
View File
@@ -352,7 +352,8 @@ func getAvailableDevices(context *clusterd.Context, agent *OsdAgent) (*DeviceOsd
} else {
isAvailable, rejectedReason, err = sys.CheckIfDeviceAvailable(context.Executor, device.RealPath, agent.pvcBacked)
if err != nil {
return nil, errors.Wrapf(err, "failed to get device %q info", device.Name)
isAvailable = false
rejectedReason = fmt.Sprintf("failed to check if the device %q is available. %v", device.Name, err)
}
}