kubernetes/test/e2e_node/remote
Kubernetes Submit Queue 99fd98a893
Merge pull request #61740 from filbranden/nodetest1
Automatic merge from submit-queue (batch tested with PRs 61482, 61740). 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>.

Make systemd service name for kubelet use a timestamp in e2e-node tests.

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

This makes it easier to figure out which execution was last when looking at the output of `systemd list-units kubelet-*.service`.

We try to find the name of the /tmp/node-e2e-* directory and use the same timestamp if we can. Otherwise, we just call Now() again, which isn't as nice (as the unit name and directory name will not match) but will still produce unit names that will be ordered when launching multiple subsequent executions on the same host.


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

**Special notes for your reviewer**:

Tested using `make test-e2e-node REMOTE=true` and then checking `systemctl list-units kubelet-*.service` on the target host.

```
$ systemctl list-units kubelet-*.service
kubelet-20180326T142016.service loaded active exited /tmp/node-e2e-20180326T142016/kubelet --kubeconfig /tmp/node-e2e-20180326T142016/kubeconfig --root-dir /var/lib/kubelet ...
kubelet-20180326T143550.service loaded active exited /tmp/node-e2e-20180326T143550/kubelet --kubeconfig /tmp/node-e2e-20180326T143550/kubeconfig --root-dir /var/lib/kubelet ...
```

The units are sorted in the order they were launched.

**Release note**:

```release-note
NONE
```
2018-03-29 21:10:03 -07:00
..
BUILD use node-e2e framework for testing cadvisor 2018-01-31 10:14:54 -08:00
cadvisor_e2e.go use node-e2e framework for testing cadvisor 2018-01-31 10:14:54 -08:00
node_conformance.go expunge the word 'manifest' from Kubelet's config API 2018-02-23 11:44:06 -08:00
node_e2e.go fix all the typos across the project 2018-02-11 11:04:14 +08:00
remote.go Make systemd service name for kubelet use a timestamp in e2e-node tests. 2018-03-29 11:17:42 -07:00
ssh.go Add flag to node e2e test specifying location of ssh privkey 2016-12-21 11:52:41 -08:00
types.go use node-e2e framework for testing cadvisor 2018-01-31 10:14:54 -08:00
utils.go Use curl instead of wget to fetch the CNI tarball in e2e-node test 2018-03-27 09:41:09 -07:00