Skip to content

Commit

Permalink
Merge pull request #73 from VEVO/optimize_roller_timing
Browse files Browse the repository at this point in the history
before this we waited a long time between each node terminating for n…
  • Loading branch information
davidgibbons authored Dec 1, 2022
2 parents 3c95af6 + dff3505 commit e9ca9ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion roller.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var (
clusterTerminatorServiceName = "terminator"
clusterTerminatorServiceNamespace = "kube-system"
provisionAttemptCounter = make(map[string]int)
terminationWaitPeriod = time.Duration(180 * time.Second)
terminationWaitPeriod = time.Duration(5 * time.Second)
apiKey = os.Getenv("DATADOG_API_KEY")
appKey = os.Getenv("DATADOG_APP_KEY")
)
Expand Down Expand Up @@ -531,6 +531,9 @@ func replaceInstancesVerifyAndTerminate(awsClient *awsClient, component string,
err = fmt.Errorf("an error occurred attempting to cordon kubernetes nodes %s\n Error: %s", instanceList, err)
glog.V(4).Infof("%s", err)
}
// Wait for 60 seconds just to let the drain finish and things to calm down
glog.V(4).Infof("Pausing 1 minute for the drain to calm down")
time.Sleep(60 * time.Second)

// Suspend the launch process so the ASG doesn't backfill the instances we're about to terminate
scalingProcesses = []*string{
Expand Down

0 comments on commit e9ca9ab

Please sign in to comment.