mirror of
https://github.com/minio/minio.git
synced 2024-12-23 21:55:53 -05:00
ignore remote disks with diskID empty as offline (#14168)
concurrent loading of erasure sets can now expose a situation in a distributed setup that might return diskID as empty, treat such disks as offline.
This commit is contained in:
parent
ebc3627c73
commit
b68f0cbde4
@ -160,6 +160,9 @@ func connectEndpoint(endpoint Endpoint) (StorageAPI, *formatErasureV3, error) {
|
||||
// - i'th position is the set index
|
||||
// - j'th position is the disk index in the current set
|
||||
func findDiskIndexByDiskID(refFormat *formatErasureV3, diskID string) (int, int, error) {
|
||||
if diskID == "" {
|
||||
return -1, -1, errDiskNotFound
|
||||
}
|
||||
if diskID == offlineDiskUUID {
|
||||
return -1, -1, fmt.Errorf("diskID: %s is offline", diskID)
|
||||
}
|
||||
@ -439,6 +442,9 @@ func newErasureSets(ctx context.Context, endpoints PoolEndpoints, storageDisks [
|
||||
}
|
||||
return
|
||||
}
|
||||
if diskID == "" {
|
||||
return
|
||||
}
|
||||
m, n, err := findDiskIndexByDiskID(format, diskID)
|
||||
if err != nil {
|
||||
logger.LogIf(ctx, err)
|
||||
@ -1337,6 +1343,7 @@ func (s *erasureSets) HealFormat(ctx context.Context, dryRun bool) (res madmin.H
|
||||
|
||||
m, n, err := findDiskIndexByDiskID(refFormat, format.Erasure.This)
|
||||
if err != nil {
|
||||
logger.LogIf(ctx, err)
|
||||
continue
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user