mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -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:
parent
9e9bfd0255
commit
901d1314af
@ -86,16 +86,14 @@ function __init__()
|
|||||||
}
|
}
|
||||||
|
|
||||||
function perform_test() {
|
function perform_test() {
|
||||||
start_minio_3_node 120
|
start_minio_3_node 60
|
||||||
|
|
||||||
echo "Testing Distributed Erasure setup healing of drives"
|
echo "Testing Distributed Erasure setup healing of drives"
|
||||||
echo "Remove the contents of the disks belonging to '${1}' erasure set"
|
echo "Remove the contents of the disks belonging to '${1}' erasure set"
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
rm -rf ${WORK_DIR}/${1}/*/
|
rm -rf ${WORK_DIR}/${1}/*/
|
||||||
|
|
||||||
start_minio_3_node 200
|
start_minio_3_node 60
|
||||||
|
|
||||||
rv=$(check_online)
|
rv=$(check_online)
|
||||||
if [ "$rv" == "1" ]; then
|
if [ "$rv" == "1" ]; then
|
||||||
|
@ -298,10 +298,9 @@ func (client *storageRESTClient) DiskInfo(ctx context.Context) (info DiskInfo, e
|
|||||||
client.diskInfoCache.Update = client.diskInfo
|
client.diskInfoCache.Update = client.diskInfo
|
||||||
})
|
})
|
||||||
val, err := client.diskInfoCache.Get()
|
val, err := client.diskInfoCache.Get()
|
||||||
if err == nil {
|
if val != nil {
|
||||||
info = val.(DiskInfo)
|
return val.(DiskInfo), err
|
||||||
}
|
}
|
||||||
|
|
||||||
return info, err
|
return info, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user