Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default cert dir for oc cluster up engine API client if DOCKER_TLS_VERIFY is set #12035

Merged
merged 1 commit into from Dec 6, 2016

Conversation

jimmidyson
Copy link
Contributor

If DOCKER_TLS_VERIFY env var is set and DOCKER_CERT_PATH is not set, this uses the default cert path for the engine API client of $HOME/.docker to be consistent with https://github.com/fsouza/go-dockerclient/blob/e374214216d867f2c16b84972ad3bb22b56b47c3/client.go#L992-L1019.

If we could upgrade fsouza/go-dockerclient then this could drop the engine API client completely to use one consistent client, however upgrading fsouza client would require upgrading docker dependency too which is probably undesirable atm (plus being additional work).

@jimmidyson
Copy link
Contributor Author

Would love to get this merged if possible so I don't have to mess with environment variables or use a local build of openshift.

@jimmidyson
Copy link
Contributor Author

@csrwng Any comments on this?

@csrwng
Copy link
Contributor

csrwng commented Dec 5, 2016

@jimmidyson sorry for the delay. I didn't see this one. @jim-minter can you please review?

dockerTLSVerify := os.Getenv("DOCKER_TLS_VERIFY")
dockerCertPath := os.Getenv("DOCKER_CERT_PATH")
if len(dockerTLSVerify) > 0 && len(dockerCertPath) == 0 {
home := homedir.Get()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using

dockerCertPath = cliconfig.ConfigDir()
os.SetEnv("DOCKER_CERT_PATH", dockerCertPath)

would be preferable here as it should additionally handle the DOCKER_CONFIG env var (thanks Docker!) and keep us closer to the Docker client library for when we remove the fsouza client one day.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done - thanks!

@jim-minter
Copy link
Contributor

lgtm - @csrwng please merge

@jim-minter jim-minter assigned csrwng and unassigned jim-minter Dec 5, 2016
@csrwng
Copy link
Contributor

csrwng commented Dec 5, 2016

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to f510f9d

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to f510f9d

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/12023/) (Base Commit: b2def44)

@openshift-bot
Copy link
Contributor

openshift-bot commented Dec 6, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/12036/) (Base Commit: 8bc9053) (Image: devenv-rhel7_5491)

@openshift-bot openshift-bot merged commit 6eefa2a into openshift:master Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants