Use of --cidfile prevents a container from starting up #4808
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
"Running containers with podman and shareable systemd services" by @vrothberg suggests the following template for service units that run podman:
But
podman rm ...
does not clean up the--cidfile
, and subsequent attempts to start this container will fail with:This behavior was introduced in #530, but this brings up a variety of problems. If I want to start a container using
--cidfile
:--cidfile
first? That would seem to lead to the same problem that podman run --cidfile: fail if path exists #530 was designed to fix.--cidfile
part ofExecStop
? I guess we can do that, but that means that people using--cidfile
will always need to perform an additional cleanup step, regardless of whether they are using systemd units or something else.It seems like the ideal behavior would be for
podman
to clean up the--cidfile
when the container is removed.Steps to reproduce the issue:
podman run --cidfile /tmp/cidfile alpine true
podman rm $(cat /tmp/cidfile)
podman run --cidfile /tmp/cidfile alpine true
Describe the results you received:
Error: container id file exists. Ensure another container is not using it or delete /tmp/cidfile
Describe the results you expected:
I expected the container to start the second time.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):The text was updated successfully, but these errors were encountered: