Description of problem: podman top has different arguments, which means it doesn't work as a drop-in docker replacement. Specifically, this breaks Jenkins when trying to use podman for jobs. During the job, Jenkins executes this line: docker top [hash] -eo pid,comm This works fine with Docker, but Podman uses an incompatible syntax, and wants this instead: podman top [hash] pid comm Version-Release number of selected component (if applicable): podman-1.2.0-2.git3bd528e.fc30.x86_64 How reproducible: Reliably Steps to Reproduce: 1. podman run -t -d -u 983:983 --entrypoint='' fedora cat 6e36d7ef2ffc11b04cd36844f87f2299f6b50230a6085d55a6a521af17a91346 2. podman top 6e36d7ef2ffc11b04cd36844f87f2299f6b50230a6085d55a6a521af17a91346 -eo pid,comm Error: unknown shorthand flag: 'e' in -eo Actual results: Error: unknown shorthand flag: 'e' in -eo Expected results: sudo docker top c2f2e928d7ed5d3d735e5645885b8463a2e4d26c82542516f6fabeba261c1863 -eo pid,comm PID COMMAND 31079 cat Additional info:
Valentin, we could just add an -e and -o options and make them be a noop to be compatible.
There's also the comma: podman top 6e36d7ef2ffc11b04cd36844f87f2299f6b50230a6085d55a6a521af17a91346 pid,comm Error: 'pid,comm': unknown descriptor Also, if you'd like to try this with Jenkins: 1. Install Jenkins 2. Go to http://localhost:8080 3. Go to manage Jenkins -> manage Plugins -> available 4. Install Pipeline and Docker Pipeline 5. Create job with New Item -> Pipeline 6. In the pipeline script textbox, enter this: pipeline { agent { docker { image 'fedora' } } stages { stage("Test") { steps { sh 'echo This is working' } } } }
Partial fixes here. https://github.com/containers/libpod/pull/3006
The issue is now fixed by https://github.com/containers/libpod/pull/3034 and will is released with Podman v1.3.0 which should be hit the packages shortly.
podman-1.3.1-1.git7210727.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-fe6ef87556
podman-1.3.1-1.git7210727.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-a0ddb8df76
podman-1.3.1-1.git7210727.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-a0ddb8df76
podman-1.3.1-1.git7210727.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-fe6ef87556
podman-1.3.1-1.git7210727.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
podman-1.3.1-1.git7210727.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.
It looks like this has regressed as I am hitting the same issue with Fedora Server 30 and podman 1.5.1-3. [jenkins@tinypenguin workspace]$ podman -v podman version 1.5.1 [jenkins@tinypenguin workspace]$ rpm -q podman podman-1.5.1-3.fc30.x86_64 [jenkins@tinypenguin workspace]$ cat /etc/redhat-release Fedora release 30 (Thirty) [jenkins@tinypenguin workspace]$ podman run -t -d -u 1337:1337 --entrypoint='' fedora cat 8246ef9b99a36651fe7a69776e9972b4c601b7654617adc7c5f1aeac81502e7b [jenkins@tinypenguin workspace]$ podman top 8246ef9b99a36651fe7a69776e9972b4c601b7654617adc7c5f1aeac81502e7b -eo pid,comm Error: '-eo': unknown descriptor [jenkins@tinypenguin workspace]$ podman top 8246ef9b99a36651fe7a69776e9972b4c601b7654617adc7c5f1aeac81502e7b pid comm PID COMMAND 1 cat
(In reply to Bruno Thomsen from comment #11) > It looks like this has regressed as I am hitting the same issue with Fedora > Server 30 and podman 1.5.1-3. > > [jenkins@tinypenguin workspace]$ podman -v > podman version 1.5.1 > [jenkins@tinypenguin workspace]$ rpm -q podman > podman-1.5.1-3.fc30.x86_64 > [jenkins@tinypenguin workspace]$ cat /etc/redhat-release > Fedora release 30 (Thirty) > [jenkins@tinypenguin workspace]$ podman run -t -d -u 1337:1337 > --entrypoint='' fedora cat > 8246ef9b99a36651fe7a69776e9972b4c601b7654617adc7c5f1aeac81502e7b > [jenkins@tinypenguin workspace]$ podman top > 8246ef9b99a36651fe7a69776e9972b4c601b7654617adc7c5f1aeac81502e7b -eo pid,comm > Error: '-eo': unknown descriptor > [jenkins@tinypenguin workspace]$ podman top > 8246ef9b99a36651fe7a69776e9972b4c601b7654617adc7c5f1aeac81502e7b pid comm > PID COMMAND > 1 cat Thanks for reaching out. Can you do a `podman exec 8246ef9b99a36651fe7a69776e9972b4c601b7654617adc7c5f1aeac81502e7b -eo pid,comm`? It should fail as well. Podman falls back to executing ps(1) _inside_ the container when hitting an unsupported descriptor.
(In reply to Valentin Rothberg from comment #12) > > [jenkins@tinypenguin workspace]$ podman top > > 8246ef9b99a36651fe7a69776e9972b4c601b7654617adc7c5f1aeac81502e7b -eo pid,comm > > Error: '-eo': unknown descriptor > > [jenkins@tinypenguin workspace]$ podman top > > 8246ef9b99a36651fe7a69776e9972b4c601b7654617adc7c5f1aeac81502e7b pid comm > > PID COMMAND > > 1 cat > > Thanks for reaching out. Can you do a `podman exec > 8246ef9b99a36651fe7a69776e9972b4c601b7654617adc7c5f1aeac81502e7b -eo > pid,comm`? It should fail as well. Podman falls back to executing ps(1) > _inside_ the container when hitting an unsupported descriptor. Hi Valentin, Yes, you are right. [jenkins@tinypenguin workspace]$ podman exec 8246ef9b99a36651fe7a69776e9972b4c601b7654617adc7c5f1aeac81502e7b -eo pid,comm Error: exec failed: container_linux.go:346: starting container process caused "exec: \"-eo\": executable file not found in $PATH": OCI runtime command not found error So we should just make sure that our CI pipeline container contain ps (dnf install procps-ng).
Hi Bruno, > So we should just make sure that our CI pipeline container contain ps (dnf install procps-ng). Yes, that should resolve your issue. But we see that podman-top isn't 100 percent compatible with docker-top as docker executes ps locally on the host. Podman executes ps(1) in the container to keep things a bit simpler (in the code). Ultimately, we would love users to make use of the supported format descriptors [1]. There are quite a few cool features that Docker does not support, for instance, listing the seccomp mode, the selinux label, capabilities or inspecting the PID/user of the processes in the host namespace. [1] https://github.com/containers/libpod/blob/master/docs/podman-top.1.md