Merge pull request #94747 from pwang7/patch-1

e2e test support microk8s
This commit is contained in:
Kubernetes Prow Robot 2020-09-15 08:58:21 -07:00 committed by GitHub
commit 825cf52702
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -375,7 +375,7 @@ func getCRIClient() (internalapi.RuntimeService, internalapi.ImageManagerService
// TODO: Find a uniform way to deal with systemctl/initctl/service operations. #34494
func findRunningKubletServiceName() string {
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)
regex := regexp.MustCompile("(kubelet-\\w+)")
matches := regex.FindStringSubmatch(string(stdout))