-
Notifications
You must be signed in to change notification settings - Fork 243
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
Log error when podman client cannot be initialized #6538
Log error when podman client cannot be initialized #6538
Conversation
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
1d505b4
to
650513a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another point: I find the error message (executable "echo" not found
) to be misleading for the end-user and might not be accurate. The echo
executable does exist in my PATH
, but the output of the command is not the one expected by our Podman Client.
$ ODO_EXPERIMENTAL_MODE=t PODMAN_CMD=echo odo describe component --platform podman -v 3
I0131 17:30:43.309683 3703568 version.go:28] executing [echo version --format json]
✗ unable to access podman. Do you have podman client installed? Cause: executable "echo" not found
For example, if I try to reproduce the steps provided in #6501 using a real Podman binary in my PATH
:
$ which podman-v3
/home/asoro/.local/bin/podman-v3
$ ODO_EXPERIMENTAL_MODE=t PODMAN_CMD=podman-v3 odo describe component --platform podman -v 3
I0131 17:31:21.622000 3705354 version.go:28] executing [podman-v3 version --format json]
✗ unable to access podman. Do you have podman client installed? Cause: executable "podman-v3" not found
But if I run the same Podman command to retrieve the version:
$ podman-v3 version --format json
Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman socket: Get "http://d/v3.4.4/libpod/_ping": dial unix ///run/user/1000/podman/podman.sock: connect: no such file or directory
I think odo
should display the full command output if there is an error with the command executed. What do you think?
Signed-off-by: Parthvi Vala <pvala@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you raised good points, but I think they might be out of scope for this PR. The errors "executable %q not found" is raised when you initiliaze a new Podman Client. This PR is more about logging error when there is one. I'd be happy to work on it in a separate PR.
Okay, we can do that in a separate PR. But in this case, I'd leave the original issue (#6501) open, as it was more about odo
reporting a wrong (and unhelpful) error.
We can say that this PR relates to #6501, but, to me, it does not close it yet.
Signed-off-by: Parthvi Vala <pvala@redhat.com>
/override Kubernetes-Integration-Tests/Kubernetes-Docs-Integration-Tests |
@valaparthvi: Overrode contexts on behalf of valaparthvi: Kubernetes-Integration-Tests/Kubernetes-Docs-Integration-Tests, Kubernetes-Integration-Tests/Kubernetes-Integration-Tests In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I've updated the NewPodmanCli to return the actual error. But, this will still not work for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few comments.
Co-authored-by: Armel Soro <armel@rm3l.org>
Co-authored-by: Armel Soro <armel@rm3l.org>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Parthvi!
Signed-off-by: Parthvi Vala pvala@redhat.com
What type of PR is this:
/kind bug
What does this PR do / why we need it:
Which issue(s) this PR fixes:
Fixes #6501
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer:
export PODMAN_CMD=echo
odo dev --platform podman -v 2