Allow for configuring timeout for waiting for nodes

pull/6/head
Wojciech Tyczynski 2016-12-12 16:21:45 +01:00
parent 9407bc5bbe
commit 6051870a48
5 changed files with 6 additions and 6 deletions

View File

@ -432,6 +432,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

View File

@ -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

View File

@ -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)

View File

@ -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.")

View File

@ -173,10 +173,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 (