-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Show client info even if remote connection fails #20333
Conversation
Nice! Very easy to add a system test, should you want to & should you need to repush:
|
Ephemeral COPR build failed. @containers/packit-build please check. |
ignore eln |
LGTM, other then cross compiler issues. |
libpod/define/info.go
Outdated
@@ -9,6 +9,7 @@ import ( | |||
// running libpod/podman | |||
// swagger:model LibpodInfo | |||
type Info struct { | |||
Client *ClientInfo `json:"client"` |
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.
This is a API change and nothing is ever set via API so this makes little sense to expose this over the wire.
I recommend to add a new type on the client side only, something like this in cmd/podman/system/info.go:
type Info struct {
*define.Info
Client *ClientInfo `json:"client"`
}
type ClientInfo struct {
OSArch string `json:"OS"`
Provider string `json:"provider"`
Version string `json:"version"`
}
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.
ok, fair enough ... i kind of figured that was coming.
what file should i add that to? |
|
meh, i pushed before i saw your comment; lets see how things go |
Suggestion: --- a/test/system/272-system-connection.bats
+++ b/test/system/272-system-connection.bats
@@ -104,3 +104,3 @@ $c2[ ]\+tcp://localhost:54321[ ]\+true" \
is "$output" \
- "Cannot connect to Podman. Please verify.*dial tcp.*connection refused" \
+ "OS: .*provider:.*Cannot connect to Podman. Please verify.*dial tcp.*connection refused" \
"podman info, without active service" |
When people report issues, we often ask for the result of `podman info`. However, if the problem is the remote connection, it will error out with no information at all. This PR at least will report client information before disclosing the connection error. For example on Windows: > .\bin\windows\podman.exe info client: OS: windows/amd64 provider: hyperv version: 4.8.0-dev host: null Satisfies: RUN-1720 Signed-off-by: Brent Baude <[email protected]>
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.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: baude, Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
/hold cancel Thanks, @baude |
When people report issues, we often ask for the result of
podman info
. However, if the problem is the remote connection, it will error out with no information at all. This PR at least will report client information before disclosing the connection error. For example on Windows:Satisfies: RUN-1720
Does this PR introduce a user-facing change?