k3s/test/utils
Kubernetes Submit Queue c0c74918c3
Merge pull request #58184 from yguo0905/hostexec
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

e2e test: use sleep to wait in hostexec

**What this PR does / why we need it**:

The test image hostexec waits forever by reading a named pipe that nobody writes.
09cf6c9776/test/images/hostexec/Dockerfile (L25)

Because of https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c6c70f4455d1eda91065e93cc4f7eddf4499b105, on OS images with kernel 4.11+, the wait will be interrupted unexpectedly.

```
ygg@ubuntu-gke-1604-xenial-v20171222-vm:~$ sudo docker run -d gcr.io/kubernetes-e2e-test-images/hostexec-amd64:1.0
a428c06ebd3b9a13504e453107d3fb69e859f731cae3ca0fdf898a646e394632
ygg@ubuntu-gke-1604-xenial-v20171222-vm:~$ sudo docker exec -it a428c06ebd /bin/sh
/ # timeout -t 1 cat
Terminated
ygg@ubuntu-gke-1604-xenial-v20171222-vm:~$ sudo docker logs a428c06ebd        
/bin/sh: can't open /fifo: Interrupted system call
```

Changed to use `sleep` to avoid this issue.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:

This PR fixes the test failure in https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/ci-kubernetes-e2e-gke-ubuntustable1-k8sstable1-reboot/3140

**Special notes for your reviewer**:

**Release note**:

```
None
```
2018-02-05 13:15:33 -08:00
..
image Merge pull request #58184 from yguo0905/hostexec 2018-02-05 13:15:33 -08:00
junit update BUILD files 2017-10-15 18:18:13 -07:00
BUILD the changes introduced in this commit plumbs in the generic scaler into kubectl. 2018-01-12 09:21:18 +01:00
conditions.go fix-todo 2017-09-25 15:42:21 +08:00
density_utils.go use core client with explicit version globally 2017-10-27 15:48:32 +08:00
deployment.go add basic functionality deployment integration tests 2018-02-01 16:21:07 -08:00
pod_store.go use core client with explicit version globally 2017-10-27 15:48:32 +08:00
replicaset.go add basic functionality deployment integration tests 2018-02-01 16:21:07 -08:00
runners.go the changes introduced in this commit plumbs in the generic scaler into kubectl. 2018-01-12 09:21:18 +01:00
tmpdir.go