Skip to content

Commit

Permalink
Merge pull request #30925 from caesarxuchao/gc-concurrency
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

Increase concurrent GC workers, adjust the polling interval and timeout in e2e test

ref: #30759 (comment)
  • Loading branch information
Kubernetes Submit Queue committed Aug 19, 2016
2 parents 06cfb18 + a0c6a66 commit 57ad590
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/kube-controller-manager/app/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func NewCMServer() *CMServer {
LeaderElection: leaderelection.DefaultLeaderElectionConfiguration(),
ControllerStartInterval: unversioned.Duration{Duration: 0 * time.Second},
EnableGarbageCollector: false,
ConcurrentGCSyncs: 5,
ConcurrentGCSyncs: 100,
ClusterSigningCertFile: "/etc/kubernetes/ca/ca.pem",
ClusterSigningKeyFile: "/etc/kubernetes/ca/ca.key",
},
Expand Down
17 changes: 16 additions & 1 deletion test/e2e/framework/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3131,7 +3131,22 @@ func DeleteRCAndWaitForGC(c *client.Client, ns, name string) error {
}
deleteRCTime := time.Now().Sub(startTime)
Logf("Deleting RC %s took: %v", name, deleteRCTime)
err = waitForPodsInactive(ps, 10*time.Millisecond, 10*time.Minute)
var interval, timeout time.Duration
switch {
case rc.Spec.Replicas < 100:
interval = 10 * time.Millisecond
timeout = 10 * time.Minute
case rc.Spec.Replicas < 1000:
interval = 1 * time.Second
timeout = 10 * time.Minute
case rc.Spec.Replicas < 10000:
interval = 10 * time.Second
timeout = 10 * time.Minute
default:
interval = 10 * time.Second
timeout = 40 * time.Minute
}
err = waitForPodsInactive(ps, interval, timeout)
if err != nil {
return fmt.Errorf("error while waiting for pods to become inactive %s: %v", name, err)
}
Expand Down

0 comments on commit 57ad590

Please sign in to comment.