-
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 exec -it failures #12423
Comments
exec -i is still useful for scripting commands against containers, but exec -it is valuable for typical (human) interactive shell commands |
@edsantiago Is this an exec flake we've seen before? |
I just tried updating to podman 3.3.1, and seemed to have luck after I stopped/started the containers with the new podman version, e.g. Before stopping/starting the containers, but after the update to podman 3.3.1 [root@devpodman ~]# for i in But then, stopping/starting containers... [root@devpodman ~]# for i in [root@devpodman ~]# for i in [root@devpodman ~]# for i in (no more failures with exec -it) |
On second thought, the issue returns later, but this is the first time I've seen (w/podman 3.3.1) a stop/start of a container provide a quick (albeit temporary?) fix |
could you give it a try using crun instead of runc? Is the issue still reproducible? |
Ok, I switched this LXC host with 9 containers to use crun, restarted podman and all of the containers. For now, the exec -it command doesn't come back with an error, but I'll have to check periodically to see if that changes, since I noted in my previous comment that restarting the containers would provide a temporary fix w/podman 3.3.1. I'll update this later to confirm whether things look more stable w/crun as more time passes. |
I've verified that using a crun runtime with podman 3.3.1 seems to resolve the exec -it failures/stability issues. I took some time to generate some 'exec -it up/down' metrics (every 5 minutes) for a bunch of hosts where podman containers are running, to quantify the difference between runc and crun stability for several days, and almost all of the containers had repeated exec -it failures with runc, whereas the exec -it failures are basically gone with crun. |
A bit off-topic, I also tracked down the runc vs crun issue to the containers-common (noarch, just config) package, where I noticed that there was a fix in Dec. 2020 to not explicitly set a runtime... containers/common@e50a26f#diff-f38944fdd6507cc37badbde5c66785bdebb77bd6fa2ea0674cd8117f89e95676 but I'm not sure how the github containers-common code maps to containers-common releases. # rpm -qa | grep containers-common and I verified that the installed rpm still has the hardcoded runtime setting. I added some puppet code to leverage /etc/containers/containers.conf for any config overrides before podman is installed and containers are created, to work around the initial runc runtime hardcoding from the containers-common package. I happen to use the forge podman (southalc) module for managing podman containers with puppet, so this seemed like the best solution at the moment for not creating/starting podman containers with the unwanted runc runtime when containers-common is installed as a podman dependency, and then having to change the runtime after the fact and restart the containers. |
A friendly reminder that this issue had no activity for 30 days. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman exec -it commands fail sporadically
Steps to reproduce the issue:
On a box with several containers, looping through the containers to see this issue...
# for i in
podman ps -a | egrep -vi container | awk '{print $1}'
; do podman exec -it $i bash -c "ls"; doneDescribe the results you received:
Some of the exec -it commands fail, with the following error...
Error: exec failed: container_linux.go:367: starting container process caused: open /dev/ptmx: operation not permitted: OCI permission denied
but sometimes the command is successful
anaconda-post.log dev etc lib logstash mnt proc run srv tmp var
bin entrypoint.sh home lib64 media opt root sbin sys usr
Describe the results you expected:
podman exec -it results without issues
Additional information you deem important (e.g. issue happens only occasionally):
On this particular box, with 9 podman containers, 5 of the exec -it commands fail with the error above, and 4 are successful.
Unfortunately, the issue is sporadic, in that some containers of the same type/version will fail, while other containers of the same type/version will succeed.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):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)
No
If I recall correctly, these exec -it failures seem to be a regression w/podman 3.2.3, but I'm not positive this was working reliably with podman 3.0.1 or 3.1.2.
Additional environment details (AWS, VirtualBox, physical, etc.):
Containers are running in an LXC guest, so this is also a 'container within a container' scenario.
The text was updated successfully, but these errors were encountered: