decom: Ignore not found buckets (#509) (#21023)

When decommissioning is started, the list of buckets to decommission is
calculated, however, a bucket can be removed before decommissioning reaches
it. This will cause an infinite loop of listing error complaining about
the non-existence of the bucket. This commit will ignore
errVolumeNotFound to skip the not found bucket.
This commit is contained in:
Anis Eleuch 2025-03-12 19:04:18 +01:00 committed by GitHub
parent 93e40c3ab4
commit dbf31af6cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1025,7 +1025,7 @@ func (z *erasureServerPools) decommissionPool(ctx context.Context, idx int, pool
go decommissionEntry(entry)
},
)
if err == nil || errors.Is(err, context.Canceled) {
if err == nil || errors.Is(err, context.Canceled) || errors.Is(err, errVolumeNotFound) {
break
}
setN := humanize.Ordinal(setIdx + 1)