mirror of
https://github.com/minio/minio.git
synced 2025-11-08 21:24:55 -05:00
Fix formatting disks in a test environment (#13043)
markRootDisksAsDown() relies on disk info even if the disk is unformatted. Therefore, we should always return DiskInfo data even when DiskInfo storage API returns errUnformattedDisk
This commit is contained in:
@@ -298,10 +298,9 @@ func (client *storageRESTClient) DiskInfo(ctx context.Context) (info DiskInfo, e
|
||||
client.diskInfoCache.Update = client.diskInfo
|
||||
})
|
||||
val, err := client.diskInfoCache.Get()
|
||||
if err == nil {
|
||||
info = val.(DiskInfo)
|
||||
if val != nil {
|
||||
return val.(DiskInfo), err
|
||||
}
|
||||
|
||||
return info, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user