-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 top -eo failed with error #8033
Comments
@vrothberg PTAL @LexNetAT Can you provide more details on the container this is being run in - how it was created, what image it's using, etc. |
I suggest to call |
A Debian and a Red Hat ubi8 Images were used for testing [user@nb ~]$ podman pull debian:buster-20201012 [user@nb ~]$ podman images [user@nb ~]$ podman run -t -d docker.io/library/debian:buster-20201012 cat [user@nb ~]$ podman ps [user@nb ~]$ podman top 35cd37a5304d -eo pid,comm [user@nb ~]$ podman top 35cd37a5304d pid,comm The same Image with Docker Server: [root@debian ~] docker run -t -d debian:buster-20201012 cat When the docker image contains the ps command, we get [user@nb ~]$ podman ps [user@nb ~]$ podman top 677708153f9b -eo pid,comm With the -eo paramter, the ps command is also displayed in the process list. The docker command works only with parameter -eo. Without the paramter -eo I get an error message. The parameters of the docker and podman commands should have the same behavior. We use the docker images in a Jenkins Pipeline. Jenkins use the docker top command, when running a docker image. |
Thanks for providing the details, @LexNetAT. It seems like Docker is executing ps(1) on the host (and I'm fairly certain that was not the case initially). This implies that the PIDs relate to the host's namespace. If you want to display this information with Podman, you can use the host descriptors (see podman-top man page). For instance, I think we can fallback to executing ps(1) on the host instead of in the container but that is unreliable to parse. |
A friendly reminder that this issue had no activity for 30 days. |
podman top relies on the ps command in the container |
I don't believe we should fix this, but rely on ps inside of the container. I don't think it is worth the effort to attempt to use ps on the host. |
Reopening as I think the docs (help message, man pages, etc.) should reflect the difference to Docker. If users want to find out host information of container processes, |
Did you ever find a solution to this @LexNetAT? We're running into the same problem (trying to swap out docker for podman) and this is a current hang up for us. Not sure how to get around it without forking the Docker Pipeline (aka "workflow") plugin to remove the |
This should have been fixed two years ago? What problem are you seeing? Are you using an older version of Podman? |
Interesting, based on the comments above is sounded like it would not be fixed, but I guess it was via #8449?
Same error as @LexNetAT described. When Jenkins tries to run
Podman is out of date but according to https://podman.io/releases/ still from earlier this year, not multiple years old.
I can attempt to update it next week but sounds like it should have the fix already. |
Yes, if you still have a problem open a new issue with updated data. We don't like to go back to old issues, since it is possible/likely you are seeing a different issue. |
I was able to upgrade podman but only to version 4.1.1. I'm on RHEL 8.6 and that seems to be the newest available.
The upgrade did not help but I did discover that I can bet past the ps error by running the top command with sudo but get hung up by another error that I'm not sure what to do with.
The container definitely exists, is running, and I can attach to it and run commands inside of it. Not sure what to make of that error. I assume that getting past the initial ps error by using sudo means something isn't setup correctly on my side with permissions. I can attempt to troubleshooting this elsewhere online. Just wanted to toss something in here as a follow up in case others run across this thread like I did. |
Please open a new issue with a reproducer. As Dan mentions above, recycling old issues does not work well. |
/kind bug
Description
"podman top ctrID -eo user,pid,comm" output a error message in place of the ps output
podman should support the parameter -eo as well as docker.
Steps to reproduce the issue:
Use a container id from the podman ps command, in this example the id 9526245a1f34.
podman top 9526245a1f34 -eo user,pid,comm
Describe the results you received:
Error: error executing ps(1) in the container: executable file not found in $PATH: No such file or directory: OCI runtime command not found error
Describe the results you expected:
PID COMMAND
12201 cat
With the docker command you get
docker top 9526245a1f34 -eo pid,comm
PID COMMAND
12201 cat
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
Version: 2.1.1
API Version 2.0.0
Go Version: go1.13.15
Buildt: Wed Sep 30 21:51:15 2020
OS/Arch: linux/amd64
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
The text was updated successfully, but these errors were encountered: