-
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
podman unpause
error output inconsistent
#11098
Comments
The second line isn't really having any output dropped, so much as the last line is having Otherwise, the |
@mheon The pre-pending behavior is a holdover from podman v1. A number of commands print n-1 errors without prefix and then the "last" error gets decorated. I am fine with all errors getting the prefix, but we should do it for all commands not just this one. |
Ahh, I wondered if that'd be the case. I'd +1 adding 'Error: ' to all relevant lines, because if you're string-parsing the command output (which I'm not, but it sounds like a use-case) then it's much easier to find all of the potential errors you might want to respond to that way. But also yes, like |
Currently if you execute podman unpause --all, podman pause --all Podman shows attempts to unpause containers that are not paused and prints an error. This PR catches this error and only prints errors if a paused container was not able to be unpaused. Currently if you execute podman pause --all or podman kill --all, Podman Podman shows attempts to pause or kill containers that are not running and prints an error. This PR catches this error and only prints errors if a running container was not able to be paused or killed. Also change printing of multiple errors to go to stderr and to prefix "Error: " in front to match the output of the last error. Fixes: containers#11098 Signed-off-by: Daniel J Walsh <[email protected]>
Currently if you execute podman unpause --all, podman pause --all Podman shows attempts to unpause containers that are not paused and prints an error. This PR catches this error and only prints errors if a paused container was not able to be unpaused. Currently if you execute podman pause --all or podman kill --all, Podman Podman shows attempts to pause or kill containers that are not running and prints an error. This PR catches this error and only prints errors if a running container was not able to be paused or killed. Also change printing of multiple errors to go to stderr and to prefix "Error: " in front to match the output of the last error. Fixes: containers#11098 Signed-off-by: Daniel J Walsh <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
So the issues here appear to be:
unpause
sub-command output seems to have got lost (or was correctly removed from second line but not the third?);unpause --all
? It feels as if this is perhaps a warning at most - although since the specified containers are arguably already in the desired state, do they even need to be mentioned at all?(I also have a nagging feeling that errors from other
podman
sub-commands don't enclose the container ID in double-quotes, but I've not verified this!)Describe the results you expected:
No error messages should be produced when when no errors have occurred (this may be more nuanced when using the
--all
argument than when supplied with specific parameters).Output of
podman version
:Output of
podman info --debug
:Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
The text was updated successfully, but these errors were encountered: