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

Improve error output for minikube image commands #12556

Open
aaron-prindle opened this issue Sep 22, 2021 · 3 comments
Open

Improve error output for minikube image commands #12556

aaron-prindle opened this issue Sep 22, 2021 · 3 comments
Labels
area/image Issues/PRs related to the minikube image subcommand kind/improvement Categorizes issue or PR as related to improving upon a current feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@aaron-prindle
Copy link
Contributor

aaron-prindle commented Sep 22, 2021

In attempting to use the minikube image build command as per https://minikube.sigs.k8s.io/docs/handbook/pushing/, it seems that minikube image build will exit 0 if an incorrect url parameter is used with no error/messaging-to-the-user.

To reproduce:

$ minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured
$ minikube version
minikube version: v1.23.2
commit: 0a0ad764652082477c00d51d2475284b5d39ceed
$ minikube image build foo
$ echo $?
0
$ minikube image build --alsologtostderr foo
I0922 16:58:11.750162 3712419 out.go:298] Setting OutFile to fd 1 ...
I0922 16:58:11.750276 3712419 out.go:350] isatty.IsTerminal(1) = true
I0922 16:58:11.750285 3712419 out.go:311] Setting ErrFile to fd 2...
I0922 16:58:11.750294 3712419 out.go:350] isatty.IsTerminal(2) = true
I0922 16:58:11.750381 3712419 root.go:313] Updating PATH: /usr/local/google/home/aprindle/.minikube/bin
I0922 16:58:11.750790 3712419 config.go:177] Loaded profile config "minikube": Driver=docker, ContainerRuntime=docker, KubernetesVersion=v1.22.2
I0922 16:58:11.750941 3712419 config.go:177] Loaded profile config "minikube": Driver=docker, ContainerRuntime=docker, KubernetesVersion=v1.22.2
I0922 16:58:11.751349 3712419 cli_runner.go:115] Run: docker container inspect minikube --format={{.State.Status}}
I0922 16:58:11.810827 3712419 ssh_runner.go:152] Run: systemctl --version
I0922 16:58:11.810943 3712419 cli_runner.go:115] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube
I0922 16:58:11.859032 3712419 sshutil.go:53] new ssh client: &{IP:127.0.0.1 Port:49177 SSHKeyPath:/usr/local/google/home/aprindle/.minikube/machines/minikube/id_rsa Username:docker}
I0922 16:58:11.959371 3712419 build_images.go:137] Building image from path: foo
W0922 16:58:11.959443 3712419 build_images.go:101] Failed to build image for profile minikube. make sure the profile is running. stat foo: no such file or directory
I0922 16:58:11.959477 3712419 build_images.go:109] succeeded building to: 
I0922 16:58:11.959495 3712419 build_images.go:110] failed building to: minikube
$ echo $?
0

os: linux
minikube version: v1.23.2

@aaron-prindle aaron-prindle changed the title 'minikube image build' command exits 0 with no message if incorrect parameter provided. 'minikube image build' command exits 0 with no message if incorrect parameter provided (possibly if build fails?) Sep 22, 2021
@afbjorklund
Copy link
Collaborator

afbjorklund commented Sep 23, 2021

None of the minikube image do any proper error reporting (just the log), but it is being worked on.

It was a design flaw in the minikube "machine" module that got inherited (c/p), was supposed to be fixed after the node handling... #11192

@k8s-triage-robot

This comment was marked as outdated.

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 22, 2021
@k8s-triage-robot

This comment was marked as outdated.

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 21, 2022
@spowelljr spowelljr added kind/improvement Categorizes issue or PR as related to improving upon a current feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Jan 25, 2022
@spowelljr spowelljr changed the title 'minikube image build' command exits 0 with no message if incorrect parameter provided (possibly if build fails?) Improve error output for minikube image commands Jan 25, 2022
@afbjorklund afbjorklund added the area/image Issues/PRs related to the minikube image subcommand label Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/image Issues/PRs related to the minikube image subcommand kind/improvement Categorizes issue or PR as related to improving upon a current feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

5 participants