Log error when podman client cannot be initialized#6538
Log error when podman client cannot be initialized#6538openshift-merge-robot merged 11 commits intoredhat-developer:mainfrom
Conversation
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
Signed-off-by: Parthvi Vala <[email protected]>
Signed-off-by: Parthvi Vala <[email protected]>
Signed-off-by: Parthvi Vala <[email protected]>
Signed-off-by: Parthvi Vala <[email protected]>
1d505b4 to
650513a
Compare
rm3l
left a comment
There was a problem hiding this comment.
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 <[email protected]>
There was a problem hiding this comment.
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 <[email protected]>
|
/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 DetailsIn 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 |
Co-authored-by: Armel Soro <[email protected]>
Co-authored-by: Armel Soro <[email protected]>
Signed-off-by: Parthvi Vala <[email protected]>
|
Kudos, SonarCloud Quality Gate passed!
|








Signed-off-by: Parthvi Vala [email protected]
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=echoodo dev --platform podman -v 2