Fixes restartKubelet in test/e2e_node failure.

Looks like there is some recent change on how we start kubelet service
in test_e2e_node. Fixes restartKubelet() to get right kubelet service
name to cope with the change.
pull/8/head
Jiaying Zhang 2018-04-04 11:47:03 -07:00
parent 7fed970f36
commit 0138007bdd
1 changed files with 1 additions and 1 deletions

View File

@ -399,7 +399,7 @@ func getCRIClient() (internalapi.RuntimeService, internalapi.ImageManagerService
func restartKubelet() {
stdout, err := exec.Command("sudo", "systemctl", "list-units", "kubelet*", "--state=running").CombinedOutput()
framework.ExpectNoError(err)
regex := regexp.MustCompile("(kubelet-[0-9]+)")
regex := regexp.MustCompile("(kubelet-\\w+)")
matches := regex.FindStringSubmatch(string(stdout))
Expect(len(matches)).NotTo(BeZero())
kube := matches[0]