Merge pull request #69589 from oomichi/issue/69588

Add the existence check of /proc/net/nf_conntrack
pull/58/head
k8s-ci-robot 2018-11-09 10:20:01 -08:00 committed by GitHub
commit 06e737367d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -3419,8 +3419,8 @@ func IssueSSHCommandWithResult(cmd, provider string, node *v1.Node) (*SSHResult,
LogSSHResult(result)
if result.Code != 0 || err != nil {
return nil, fmt.Errorf("failed running %q: %v (exit code %d)",
cmd, err, result.Code)
return nil, fmt.Errorf("failed running %q: %v (exit code %d, stderr %v)",
cmd, err, result.Code, result.Stderr)
}
return &result, nil

View File

@ -77,6 +77,16 @@ var _ = SIGDescribe("Network", func() {
zero := int64(0)
// Some distributions (Ubuntu 16.04 etc.) don't support the proc file.
_, err := framework.IssueSSHCommandWithResult(
"ls /proc/net/nf_conntrack",
framework.TestContext.Provider,
clientNodeInfo.node)
if err != nil && strings.Contains(err.Error(), "No such file or directory") {
framework.Skipf("The node %s does not support /proc/net/nf_conntrack", clientNodeInfo.name)
}
framework.ExpectNoError(err)
clientPodSpec := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "e2e-net-client",