mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Wait one minute after startup to restart decommissioning (#19645)
Typically not all drives are connected, so we delay 3 minutes before resuming. This greatly reduces risk of starting to list unconnected drives, or drives we risk being disconnected soon. This delay is not applied when starting with an admin call.
This commit is contained in:
@@ -535,6 +535,10 @@ func (z *erasureServerPools) Init(ctx context.Context) error {
|
||||
|
||||
if len(poolIndices) > 0 && globalEndpoints[poolIndices[0]].Endpoints[0].IsLocal {
|
||||
go func() {
|
||||
// Resume decommissioning of pools, but wait 3 minutes for cluster to stabilize.
|
||||
if err := sleepContext(ctx, 3*time.Minute); err != nil {
|
||||
return
|
||||
}
|
||||
r := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
for {
|
||||
if err := z.Decommission(ctx, poolIndices...); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user