Merge pull request #57434 from yguo0905/fix-gke-env-test

Automatic merge from submit-queue (batch tested with PRs 57434, 57221, 57417, 57474, 57481). 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>.

Node e2e test: do not return error if Docker's check-config.sh fails

**What this PR does / why we need it**:

This PR fixes the issue in https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/ci-kubernetes-e2enode-ubuntudev2-k8sbeta-gkespec/1#k8sio-gke-system-requirements-conformance-featuregkeenv-the-docker-configuration-validation-should-pass

https://github.com/moby/moby/pull/28007 changed the Docker's check-config.sh to return a non-zero exit code if the check fails. But we expect certain configs to be missing, so we should ignore the exit code.

This needs to be cherry-picked into 1.9.

**Release note**:

```release-note
None
```

/area node-e2e
/kind bug
/assign @dchen1107
pull/6/head
Kubernetes Submit Queue 2017-12-20 17:42:34 -08:00 committed by GitHub
commit 09e5ce3056
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -139,10 +139,10 @@ func checkDockerConfig() error {
if _, err := os.Stat(bin); os.IsNotExist(err) {
continue
}
output, err := runCommand(bin)
if err != nil {
return err
}
// We don't check the return code because it's OK if the script returns
// a non-zero exit code just because the configs in the whitelist are
// missing.
output, _ := runCommand(bin)
for _, line := range strings.Split(output, "\n") {
if !strings.Contains(line, "missing") {
continue