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

minikube docker-env --unset requires minikube to be running #8476

Closed
gjenkins8 opened this issue Jun 15, 2020 · 7 comments · Fixed by #8506
Closed

minikube docker-env --unset requires minikube to be running #8476

gjenkins8 opened this issue Jun 15, 2020 · 7 comments · Fixed by #8506
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@gjenkins8
Copy link

gjenkins8 commented Jun 15, 2020

Stopping minikube prevents the helper minikube docker-env --unset from working. Since the output of this command doesn't rely on minikube to be running, it doesn't seem like it should require minikube to be running (in fact, it of course makes a lot of sense to run it, if minikube is not running)

Steps to reproduce the issue:

$ minikube docker-env --unset
🤷  The control plane node must be running for this command
👉  To fix this, run: "minikube start"

Full output of minikube start command used, if not already included:
NA

$ minikube version
minikube version: v1.11.0
commit: 57e2f55f47effe9ce396cea42a1e0eb4f611ebbd
@prasadkatti
Copy link
Contributor

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 15, 2020
@afbjorklund
Copy link
Collaborator

This bug is specific to the minikube re-implementation, docker-machine does not have it.

 docker-machine stop
Stopping "default"...
Machine "default" was stopped.
 docker-machine env
Error checking TLS connection: Host is not running
 docker-machine env --unset
unset DOCKER_TLS_VERIFY
unset DOCKER_HOST
unset DOCKER_CERT_PATH
unset DOCKER_MACHINE_NAME
# Run this command to configure your shell: 
# eval $(docker-machine env --unset)

You can see how the set fails (understandable), but the unset still works - when stopped.

@priyawadhwa priyawadhwa added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Jun 15, 2020
@Harkishen-Singh
Copy link
Contributor

I would like to take this up.

Just for clarification, is unsetting the docker vars be independent of whether the docker-machine is running or not?
@afbjorklund

@afbjorklund
Copy link
Collaborator

afbjorklund commented Jun 16, 2020

@Harkishen-Singh:
Oh, docker-machine doesn't have to be running - was just comparing the CLI output of the tools

@afbjorklund
Copy link
Collaborator

For minikube docker-env and minikube podman-env, only set (the default) needs it to be running.

When using the --unset flag, it is supposed to work irregardless of the current machine status.

Basically shell detection need to be moved "higher", so that unset can use it (and exit)

And machine loading needs to be moved "lower", so that only set requires it (to run)

@Harkishen-Singh
Copy link
Contributor

Sure @afbjorklund. Thanks for the additional information. In that case, I am making changes for the podman-env as well on the same PR.

@gjenkins8
Copy link
Author

Very nice! Thank you @Harkishen-Singh !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants