mirror of https://github.com/k3s-io/k3s
Merge pull request #62135 from jiayingz/kubelet-restart-fix
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>. 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. **What this PR does / why we need it**: **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes kubelet-serial-gce-e2e test failure: https://k8s-testgrid.appspot.com/wg-resource-management#kubelet-serial-gce-e2e Thanks a lot to @mindprince for noticing this! **Special notes for your reviewer**: **Release note**: ```release-note ```pull/8/head
commit
1e767ddf60
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue