diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index 6e59d5b68d3..1a838958b4a 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -433,6 +433,7 @@ node-name node-os-distro node-path-override node-port +node-schedulable-timeout node-startup-grace-period node-status-update-frequency node-sync-period diff --git a/test/e2e/e2e.go b/test/e2e/e2e.go index 3bff3094bec..d060b6303ad 100644 --- a/test/e2e/e2e.go +++ b/test/e2e/e2e.go @@ -121,7 +121,7 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte { // In large clusters we may get to this point but still have a bunch // of nodes without Routes created. Since this would make a node // unschedulable, we need to wait until all of them are schedulable. - framework.ExpectNoError(framework.WaitForAllNodesSchedulable(c, framework.NodeSchedulableTimeout)) + framework.ExpectNoError(framework.WaitForAllNodesSchedulable(c, framework.TestContext.NodeSchedulableTimeout)) // Ensure all pods are running and ready before starting tests (otherwise, // cluster infrastructure pods that are being pulled or started can block diff --git a/test/e2e/empty.go b/test/e2e/empty.go index 10b15175b41..cc972ca3e12 100644 --- a/test/e2e/empty.go +++ b/test/e2e/empty.go @@ -32,7 +32,7 @@ var _ = framework.KubeDescribe("Empty [Feature:Empty]", func() { ns := f.Namespace.Name // TODO: respect --allow-notready-nodes flag in those functions. - framework.ExpectNoError(framework.WaitForAllNodesSchedulable(c, framework.NodeSchedulableTimeout)) + framework.ExpectNoError(framework.WaitForAllNodesSchedulable(c, framework.TestContext.NodeSchedulableTimeout)) framework.WaitForAllNodesHealthy(c, time.Minute) err := framework.CheckTestingNSDeletedExcept(c, ns) diff --git a/test/e2e/framework/test_context.go b/test/e2e/framework/test_context.go index 22a5a576fd9..af793d35071 100644 --- a/test/e2e/framework/test_context.go +++ b/test/e2e/framework/test_context.go @@ -67,6 +67,8 @@ type TestContextType struct { GatherMetricsAfterTest bool // Currently supported values are 'hr' for human-readable and 'json'. It's a comma separated list. OutputPrintType string + // NodeSchedulableTimeout is the timeout for waiting for all nodes to be schedulable. + NodeSchedulableTimeout time.Duration // CreateTestingNS is responsible for creating namespace used for executing e2e tests. // It accepts namespace base name, which will be prepended with e2e prefix, kube client // and labels to be applied to a namespace. @@ -187,6 +189,7 @@ func RegisterClusterFlags() { flag.StringVar(&cloudConfig.ClusterTag, "cluster-tag", "", "Tag used to identify resources. Only required if provider is aws.") flag.IntVar(&TestContext.MinStartupPods, "minStartupPods", 0, "The number of pods which we need to see in 'Running' state with a 'Ready' condition of true, before we try running tests. This is useful in any cluster which needs some base pod-based services running before it can be used.") flag.DurationVar(&TestContext.SystemPodsStartupTimeout, "system-pods-startup-timeout", 10*time.Minute, "Timeout for waiting for all system pods to be running before starting tests.") + flag.DurationVar(&TestContext.NodeSchedulableTimeout, "node-schedulable-timeout", 4*time.Hour, "Timeout for waiting for all nodes to be schedulable.") flag.StringVar(&TestContext.UpgradeTarget, "upgrade-target", "ci/latest", "Version to upgrade to (e.g. 'release/stable', 'release/latest', 'ci/latest', '0.19.1', '0.19.1-669-gabac8c8') if doing an upgrade test.") flag.StringVar(&TestContext.UpgradeImage, "upgrade-image", "", "Image to upgrade to (e.g. 'container_vm' or 'gci') if doing an upgrade test.") flag.StringVar(&TestContext.PrometheusPushGateway, "prom-push-gateway", "", "The URL to prometheus gateway, so that metrics can be pushed during e2es and scraped by prometheus. Typically something like 127.0.0.1:9091.") diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index abfbeb63634..7871cc95b38 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -176,10 +176,6 @@ const ( // TODO(justinsb): Avoid hardcoding this. awsMasterIP = "172.20.0.9" - - // Default time to wait for nodes to become schedulable. - // Set so high for scale tests. - NodeSchedulableTimeout = 4 * time.Hour ) var (