Change:
<!-- Please only use this template for submitting reports about continuously failing tests or jobs in Kubernetes CI --Which jobs are failing: pull-kubernetes-node-crio-e2e Which test(s) are failing: N/A Since when has it been failing: N/A Testgrid link: Reason for failure: Anything else we need to know:
/sig node
/assign

Discussion:
"os" "os/exec" "path/filepath" <ins> "regexp" </ins> "strings" "time"

return "--kubelet-flags=--kernel-memcg-notification=true " + args } <del> // updateOSSpecificKubeletFlags updates the Kubelet args with OS specific // settings. func updateOSSpecificKubeletFlags(args, host, workspace string) (string, error) { output, err := SSH(host, "cat", "/etc/os-release") </del> <ins> // osSpecificActions takes OS specific actions required for the node tests func osSpecificActions(args, host, workspace string) (string, error) { output, err := getOSDistribution(host) </ins> if err != nil { return "", fmt.Errorf("issue detecting node's OS via node's /etc/os-release. Err: %v, Output:n%s", err, output) } switch { <del> case strings.Contains(output, "ID=gci"), strings.Contains(output, "ID=cos"): </del> <ins> case strings.Contains(output, "fedora"), strings.Contains(output, "rhcos"), strings.Contains(output, "centos"), strings.Contains(output, "rhel"): return args, setKubeletSELinuxLabels(host, workspace) case strings.Contains(output, "gci"), strings.Contains(output, "cos"): </ins> args = prependMemcgNotificationFlag(args) return prependCOSMounterFlag(args, host, workspace) <del> case strings.Contains(output, "ID=ubuntu"): </del> <ins> case strings.Contains(output, "ubuntu"): </ins> return prependMemcgNotificationFlag(args), nil } return args, nil } <ins> // setKubeletSELinuxLabels set the appropriate SELinux labels for the // kubelet on Fedora CoreOS distribution func setKubeletSELinuxLabels(host, workspace string) error { cmd := getSSHCommand(" && ", fmt.Sprintf("/usr/bin/chcon -u system_u -r object_r -t bin_t %s", filepath.Join(workspace, "kubelet")), fmt.Sprintf("/usr/bin/chcon -u system_u -r object_r -t bin_t %s", filepath.Join(workspace, "e2e_node.test")), fmt.Sprintf("/usr/bin/chcon -u system_u -r object_r -t bin_t %s", filepath.Join(workspace, "ginkgo")), fmt.Sprintf("/usr/bin/chcon -u system_u -r object_r -t bin_t %s", filepath.Join(workspace, "mounter")), fmt.Sprintf("/usr/bin/chcon -R -u system_u -r object_r -t bin_t %s", filepath.Join(workspace, "cni", "bin/")), ) output, err := SSH(host, "sh", "-c", cmd) if err != nil { return fmt.Errorf("Unable to apply SELinux labels. Err: %v, Output:n%s", err, output) } return nil } func getOSDistribution(host string) (string, error) { output, err := SSH(host, "cat", "/etc/os-release") if err != nil { return "", fmt.Errorf("issue detecting node's OS via node's /etc/os-release. Err: %v, Output:n%s", err, output) } var re = regexp.MustCompile(`(?m)^ID="?(w+)"?`) subMatch := re.FindStringSubmatch(output) if len(subMatch) > 0 { return subMatch[1], nil } return "", fmt.Errorf("Unable to parse os-release for the host, %s", host) } </ins> // RunTest runs test on the node. func (n *NodeE2ERemote) RunTest(host, workspace, results, imageDesc, junitFilePrefix, testArgs, ginkgoArgs, systemSpecName, extraEnvs string, timeout time.Duration) (string, error) { // Install the cni plugins and add a basic CNI configuration.

// Kill any running node processes cleanupNodeProcesses(host) <del> testArgs, err := updateOSSpecificKubeletFlags(testArgs, host, workspace) </del> <ins> testArgs, err := osSpecificActions(testArgs, host, workspace) </ins> if err != nil { return "", err }