k3s/test
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
..
e2e Merge pull request #36600 from MrHohn/e2e-dnsautoscaling-fix 2016-11-29 15:52:13 -08:00
e2e_node generated: refactor 2016-11-23 22:30:47 -06:00
fixtures Revert "add a unit test" 2016-11-22 21:01:20 -08:00
images Change dnsutils image to use alpine 2016-11-14 13:50:51 -08:00
integration generated: refactor 2016-11-23 22:30:47 -06:00
kubemark kubemark: minor fix start-kubemark.sh 2016-11-22 18:00:23 -08:00
list Improve update_owners.py username detection and error message. 2016-10-28 13:23:19 -07:00
soak /test/soak 2016-11-23 15:53:09 -08:00
utils run hack/update-all.sh 2016-11-23 15:53:09 -08:00
OWNERS
test_owners.csv Fix cross-build for memcg notification 2016-11-23 12:36:04 -05:00