Open CendioMartin opened 1 month ago
I just managed to capture something on the command line while the Jenkins job was running:
[jenkins@build workspace]$ podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8a596e0f3675 localhost/autotests:latest /sbin/init 2 seconds ago Stopping autotests
[jenkins@build workspace]$ podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8a596e0f3675 localhost/autotests:latest /sbin/init 3 seconds ago Removing autotests
WARN[0000] Found incomplete layer "1679fb7d73228ecdab93ad4cbcb81ff97e7c16090634ef6340768d4998be1188", deleting it
[jenkins@build workspace]$ podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8a596e0f3675 localhost/autotests:latest /sbin/init 7 seconds ago Removing autotests
After that WARN[0000] Found incomplete layer "1679fb7d73228ecdab93ad4cbcb81ff97e7c16090634ef6340768d4998be1188", deleting it
it's stuck in Removing
state
While this is definitely a bug, I will note that you should be able to work around it by adding --replace
to your podman run
command like.
Also: is there a potential something is killing processes in the background? My read on this is that the cleanup process launched when the container exits is probably being killed by Jenkins before it can completely remove the container.
Agreed, also if you want the container gone you can just use podman rm -f
instead of doing the podman stop
relying on the auto deletion from the --rm
arg.
And in general if you have a problem in RHEL you should contact the RHEL support not upstream as we only support the latest version upstream.
Issue Description
I am not sure if this issue belongs here, or perhaps should be filed to Jenkins. I'm a bit at a loss here as to why this happens, so I'll give it a try here first.
There is a Jenkins job that builds a container, starts it and performs some tests inside the container. Once the tests are done, the container is stopped with
podman stop autotests
Occasionally, the container fails to start with the message
The command to start the container is
The Jenkins job that that initializes this is a 'Execute Shell' with
And the contents of
./runtests.sh
This has been working fine for some years, but since 2024-05-23 it sporadically would fail with
Output of
podman ps
for when this happens:However,
podman ps -a
shows the container stuck at Removing:(Sometimes it has been in Removing state for over 18 hours)
The only way to recover is to manually doing a
podman rm autotests
which will make the Job run again for a while, until it happens next time.I managed to capture some more information with
podman stop--log-level=debug autotests
for when the previous (Sucessfull) job finished:And here is the log from the next run, that fails:
I've also tried to reproduce this issue manually from the command-line, executing
podman run --rm ...
andpodman stop
, numerous times, but so far, been unable to reproduce it.As mentioned, this started on and after 2025-05-23, the system received RHEL updates to
Steps to reproduce the issue
Steps to reproduce the issue 1. 2. 3.
Describe the results you received
Error: creating container storage: the container name "autotests" is already in use by cbcbe2f2b3e60e8292a2e87f655787858fe67b1d912bebee71ef098ad87f4372. You have to remove that container to be able to reuse that name: that name is already in use, or use --replace to instruct Podman to do so.
Describe the results you expected
The container should start successfully
podman info output
Podman in a container
No
Privileged Or Rootless
Privileged
Upstream Latest Release
No
Additional environment details
Podman executed through Jenkins 2.452.1
Additional information
No response