mirror of
https://github.com/minio/minio.git
synced 2024-12-25 06:35:56 -05:00
heal: Fix heal buckets result reporting (#9397)
healBucket() was not properly collecting results after healing buckets. This commit adds After drives information correctly.
This commit is contained in:
parent
3ff5bf2369
commit
2eeb0e6a0b
@ -122,11 +122,6 @@ func healBucket(ctx context.Context, storageDisks []StorageAPI, bucket string, w
|
|||||||
Endpoint: drive,
|
Endpoint: drive,
|
||||||
State: beforeState[i],
|
State: beforeState[i],
|
||||||
})
|
})
|
||||||
res.After.Drives = append(res.After.Drives, madmin.HealDriveInfo{
|
|
||||||
UUID: "",
|
|
||||||
Endpoint: drive,
|
|
||||||
State: afterState[i],
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,12 +146,26 @@ func healBucket(ctx context.Context, storageDisks []StorageAPI, bucket string, w
|
|||||||
errs = g.Wait()
|
errs = g.Wait()
|
||||||
|
|
||||||
reducedErr = reduceWriteQuorumErrs(ctx, errs, bucketOpIgnoredErrs, writeQuorum)
|
reducedErr = reduceWriteQuorumErrs(ctx, errs, bucketOpIgnoredErrs, writeQuorum)
|
||||||
if reducedErr == errXLWriteQuorum {
|
if reducedErr != nil {
|
||||||
// Purge successfully created buckets if we don't have writeQuorum.
|
if reducedErr == errXLWriteQuorum {
|
||||||
undoMakeBucket(storageDisks, bucket)
|
// Purge successfully created buckets if we don't have writeQuorum.
|
||||||
|
undoMakeBucket(storageDisks, bucket)
|
||||||
|
}
|
||||||
|
return res, reducedErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return res, reducedErr
|
for i := range afterState {
|
||||||
|
if storageDisks[i] != nil {
|
||||||
|
drive := storageDisks[i].String()
|
||||||
|
res.After.Drives = append(res.After.Drives, madmin.HealDriveInfo{
|
||||||
|
UUID: "",
|
||||||
|
Endpoint: drive,
|
||||||
|
State: afterState[i],
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// listAllBuckets lists all buckets from all disks. It also
|
// listAllBuckets lists all buckets from all disks. It also
|
||||||
|
Loading…
Reference in New Issue
Block a user