mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
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.
This commit is contained in:
parent
7fed970f36
commit
0138007bdd
@ -399,7 +399,7 @@ func getCRIClient() (internalapi.RuntimeService, internalapi.ImageManagerService
|
|||||||
func restartKubelet() {
|
func restartKubelet() {
|
||||||
stdout, err := exec.Command("sudo", "systemctl", "list-units", "kubelet*", "--state=running").CombinedOutput()
|
stdout, err := exec.Command("sudo", "systemctl", "list-units", "kubelet*", "--state=running").CombinedOutput()
|
||||||
framework.ExpectNoError(err)
|
framework.ExpectNoError(err)
|
||||||
regex := regexp.MustCompile("(kubelet-[0-9]+)")
|
regex := regexp.MustCompile("(kubelet-\\w+)")
|
||||||
matches := regex.FindStringSubmatch(string(stdout))
|
matches := regex.FindStringSubmatch(string(stdout))
|
||||||
Expect(len(matches)).NotTo(BeZero())
|
Expect(len(matches)).NotTo(BeZero())
|
||||||
kube := matches[0]
|
kube := matches[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user