k3s/test/e2e
Kubernetes Submit Queue ea576b7c53 Merge pull request #36600 from MrHohn/e2e-dnsautoscaling-fix
Automatic merge from submit-queue

Fixes dns autoscaling test flakes

Fixes  #36457 and fixes #36569.

#36457 is flake due to the 10 minutes timeout for scaling down cluster. Changes to use `scaleDownTimeout` from [test/e2e/cluster_size_autoscaling.go](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/cluster_size_autoscaling.go), which is 15 minutes.

The failure in #36569 is because we get the schedulable nodes number at the beginning of the test and assume it will not change unless we manually change the cluster size. But below logs indicate there may be nodes become ready after the test has begun. 

```
[BeforeEach] [k8s.io] DNS horizontal autoscaling
  /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/dns_autoscaling.go:71
Nov 10 00:36:26.951: INFO: Condition Ready of node jenkins-e2e-minion-group-x6w1 is false instead of true. Reason: KubeletNotReady, message: Kubenet does not have netConfig. This is most likely due to lack of PodCIDR
STEP: Replace the dns autoscaling parameters with testing parameters
Nov 10 00:36:26.961: INFO: DNS autoscaling ConfigMap updated.
STEP: Wait for kube-dns scaled to expected number
Nov 10 00:36:26.961: INFO: Waiting up to 5m0s for kube-dns reach 8 replicas
...
Expected error:
      <*errors.errorString | 0xc420b17ef0>: {
          s: "err waiting for DNS replicas to satisfy 8, got 9: timed out waiting for the condition",
      }
      err waiting for DNS replicas to satisfy 8, got 9: timed out waiting for the condition
  not to have occurred
```

This fix puts the logic of counting schedulable nodes into the polling loop. By doing so, the test will have the correct expected replicas count even if schedulable nodes change in between.

@bowei @bprashanth

---

Updates: all `ExpectNoError(err)` are changed to `Expect(err).NotTo(HaveOccurred())`
2016-11-29 15:52:13 -08:00
..
chaosmonkey autogenerated 2016-10-21 17:32:32 -07:00
common run hack/update-all.sh 2016-11-23 15:53:09 -08:00
framework generated: refactor 2016-11-23 22:30:47 -06:00
generated revert revert of test/e2e/generated/BUILD 2016-11-18 11:24:19 -08:00
perftype autogenerated 2016-10-21 17:32:32 -07:00
testing-manifests Merge pull request #36910 from janetkuo/restart-cluster-statefulset 2016-11-17 20:50:56 -08:00
BUILD generated: refactor 2016-11-23 22:30:47 -06:00
addon_update.go test/e2e 2016-11-23 15:53:09 -08:00
autoscaling_utils.go test/e2e 2016-11-23 15:53:09 -08:00
batch_v1_jobs.go test/e2e 2016-11-23 15:53:09 -08:00
cadvisor.go test/e2e 2016-11-23 15:53:09 -08:00
cluster_logging_es.go test/e2e 2016-11-23 15:53:09 -08:00
cluster_logging_gcl.go test/e2e 2016-11-23 15:53:09 -08:00
cluster_logging_utils.go test/e2e 2016-11-23 15:53:09 -08:00
cluster_size_autoscaling.go Merge pull request #37481 from mwielgus/more-debug-ca-e2e 2016-11-28 11:45:17 -08:00
cluster_upgrade.go test/e2e 2016-11-23 15:53:09 -08:00
cronjob.go generated: refactor 2016-11-23 22:30:47 -06:00
daemon_restart.go test/e2e 2016-11-23 15:53:09 -08:00
daemon_set.go test/e2e 2016-11-23 15:53:09 -08:00
dashboard.go Replace client with clientset in code 2016-10-23 22:00:35 +02:00
density.go test/e2e 2016-11-23 15:53:09 -08:00
deployment.go test/e2e 2016-11-23 15:53:09 -08:00
disruption.go Merge pull request #37489 from mwielgus/enable-e2e-gke 2016-11-28 13:25:55 -08:00
dns.go test/e2e 2016-11-23 15:53:09 -08:00
dns_autoscaling.go Fixes dns autoscaling test flakes 2016-11-27 22:20:54 -08:00
dns_configmap.go pkg/dns 2016-11-23 15:53:09 -08:00
e2e-example-config.json Add viper support to core e2es 2016-09-15 18:38:01 -04:00
e2e.go test/e2e 2016-11-23 15:53:09 -08:00
e2e_test.go Add viper support to core e2es 2016-09-15 18:38:01 -04:00
empty.go Stricter timeouts for nodePort curling 2016-11-03 22:31:39 -07:00
empty_dir_wrapper.go test/e2e 2016-11-23 15:53:09 -08:00
etcd_failure.go test/e2e 2016-11-23 15:53:09 -08:00
events.go test/e2e 2016-11-23 15:53:09 -08:00
example_cluster_dns.go test/e2e 2016-11-23 15:53:09 -08:00
example_k8petstore.go test/e2e 2016-11-23 15:53:09 -08:00
examples.go test/e2e 2016-11-23 15:53:09 -08:00
federated-ingress.go Updating federation e2e tests to verify cascading deletion 2016-11-18 14:44:06 -08:00
federated-namespace.go test/e2e 2016-11-23 15:53:09 -08:00
federated-secret.go test/e2e 2016-11-23 15:53:09 -08:00
federated-service.go Creating configmap for kube-dns 2016-11-29 00:31:33 -08:00
federation-apiserver.go Replace client with clientset in code 2016-10-23 22:00:35 +02:00
federation-authn.go Replace client with clientset in code 2016-10-23 22:00:35 +02:00
federation-daemonset.go Updating federation e2e tests to verify cascading deletion 2016-11-18 14:44:06 -08:00
federation-deployment.go Fixing a typo in deployment e2e 2016-11-23 11:18:32 -08:00
federation-event.go Replace client with clientset in code 2016-10-23 22:00:35 +02:00
federation-replicaset.go Updating federation e2e tests to verify cascading deletion 2016-11-18 14:44:06 -08:00
federation-util-14.go manual changes to let client-gen use versioned options 2016-10-04 20:39:29 -07:00
federation-util.go test/e2e 2016-11-23 15:53:09 -08:00
garbage_collector.go test/e2e 2016-11-23 15:53:09 -08:00
generated_clientset.go test/e2e 2016-11-23 15:53:09 -08:00
gke_local_ssd.go test/e2e 2016-11-23 15:53:09 -08:00
gke_node_pools.go Use clientset in GetReadySchedulableNodesOrDie 2016-10-19 15:55:39 +02:00
google_compute.go
ha_master.go Revert "Removed "feature" tag" 2016-11-24 11:52:31 +01:00
horizontal_pod_autoscaling.go test/e2e 2016-11-23 15:53:09 -08:00
ingress.go Replace client with clientset in code 2016-10-23 22:00:35 +02:00
ingress_utils.go test/e2e 2016-11-23 15:53:09 -08:00
initial_resources.go test/e2e 2016-11-23 15:53:09 -08:00
job.go test/e2e 2016-11-23 15:53:09 -08:00
kibana_logging.go test/e2e 2016-11-23 15:53:09 -08:00
kube_proxy.go test/e2e 2016-11-23 15:53:09 -08:00
kubectl.go test/e2e 2016-11-23 15:53:09 -08:00
kubelet.go test/e2e 2016-11-23 15:53:09 -08:00
kubelet_perf.go test/e2e 2016-11-23 15:53:09 -08:00
limit_range.go test/e2e 2016-11-23 15:53:09 -08:00
load.go test/e2e 2016-11-23 15:53:09 -08:00
logging_soak.go test/e2e 2016-11-23 15:53:09 -08:00
mesos.go test/e2e 2016-11-23 15:53:09 -08:00
metrics_grabber_test.go test/e2e 2016-11-23 15:53:09 -08:00
monitoring.go test/e2e 2016-11-23 15:53:09 -08:00
namespace.go test/e2e 2016-11-23 15:53:09 -08:00
network_partition.go test/e2e 2016-11-23 15:53:09 -08:00
networking.go Replace client with clientset in code 2016-10-23 22:00:35 +02:00
networking_perf.go test/e2e 2016-11-23 15:53:09 -08:00
node_problem_detector.go test/e2e 2016-11-23 15:53:09 -08:00
nodeoutofdisk.go test/e2e 2016-11-23 15:53:09 -08:00
opaque_resource.go test/e2e 2016-11-23 15:53:09 -08:00
pd.go test/e2e 2016-11-23 15:53:09 -08:00
persistent_volumes.go test/e2e 2016-11-23 15:53:09 -08:00
petset.go generated: refactor 2016-11-23 22:30:47 -06:00
pod_gc.go test/e2e 2016-11-23 15:53:09 -08:00
pods.go test/e2e 2016-11-23 15:53:09 -08:00
portforward.go test/e2e 2016-11-23 15:53:09 -08:00
pre_stop.go test/e2e 2016-11-23 15:53:09 -08:00
proxy.go test/e2e 2016-11-23 15:53:09 -08:00
rc.go test/e2e 2016-11-23 15:53:09 -08:00
reboot.go test/e2e 2016-11-23 15:53:09 -08:00
replica_set.go test/e2e 2016-11-23 15:53:09 -08:00
rescheduler.go test/e2e 2016-11-23 15:53:09 -08:00
resize_nodes.go test/e2e 2016-11-23 15:53:09 -08:00
resource_quota.go test/e2e 2016-11-23 15:53:09 -08:00
restart.go test/e2e 2016-11-23 15:53:09 -08:00
scheduler_predicates.go test/e2e 2016-11-23 15:53:09 -08:00
security_context.go test/e2e 2016-11-23 15:53:09 -08:00
service.go test/e2e 2016-11-23 15:53:09 -08:00
service_accounts.go test/e2e 2016-11-23 15:53:09 -08:00
service_latency.go test/e2e 2016-11-23 15:53:09 -08:00
serviceloadbalancers.go test/e2e 2016-11-23 15:53:09 -08:00
ssh.go Use clientset in GetReadySchedulableNodesOrDie 2016-10-19 15:55:39 +02:00
third-party.go test/e2e 2016-11-23 15:53:09 -08:00
ubernetes_lite.go test/e2e 2016-11-23 15:53:09 -08:00
util_iperf.go
volume_provisioning.go test/e2e 2016-11-23 15:53:09 -08:00
volumes.go test/e2e 2016-11-23 15:53:09 -08:00