mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
fix: wrapped error will not equal in decommissioning (#16113)
This commit is contained in:
parent
97eb7dbf5f
commit
fe8eed963e
@ -539,13 +539,11 @@ func (z *erasureServerPools) Init(ctx context.Context) error {
|
|||||||
r := rand.New(rand.NewSource(time.Now().UnixNano()))
|
r := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||||
for {
|
for {
|
||||||
if err := z.Decommission(ctx, pool.ID); err != nil {
|
if err := z.Decommission(ctx, pool.ID); err != nil {
|
||||||
switch err {
|
if errors.Is(err, errDecommissionAlreadyRunning) {
|
||||||
// we already started decommission
|
|
||||||
case errDecommissionAlreadyRunning:
|
|
||||||
// A previous decommission running found restart it.
|
// A previous decommission running found restart it.
|
||||||
z.doDecommissionInRoutine(ctx, idx)
|
z.doDecommissionInRoutine(ctx, idx)
|
||||||
return
|
return
|
||||||
default:
|
}
|
||||||
if configRetriableErrors(err) {
|
if configRetriableErrors(err) {
|
||||||
logger.LogIf(ctx, fmt.Errorf("Unable to resume decommission of pool %v: %w: retrying..", pool, err))
|
logger.LogIf(ctx, fmt.Errorf("Unable to resume decommission of pool %v: %w: retrying..", pool, err))
|
||||||
time.Sleep(time.Second + time.Duration(r.Float64()*float64(5*time.Second)))
|
time.Sleep(time.Second + time.Duration(r.Float64()*float64(5*time.Second)))
|
||||||
@ -554,7 +552,6 @@ func (z *erasureServerPools) Init(ctx context.Context) error {
|
|||||||
logger.LogIf(ctx, fmt.Errorf("Unable to resume decommission of pool %v: %w", pool, err))
|
logger.LogIf(ctx, fmt.Errorf("Unable to resume decommission of pool %v: %w", pool, err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}(pool)
|
}(pool)
|
||||||
|
Loading…
Reference in New Issue
Block a user