podman: podman-2.2.0_rc2 & later: '--rm' option isn't removing exited containers?
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I have a container I’ve launched as follows:
podman run --rm --quiet --detach --init --network host --pids-limit 2048 --name <process>-daily <process>:latest
… with the expectation that, once the container terminates for any reason, it will be removed. This allowed for a primitive form of locking when run from a cron-job: if the process completed it’s container would be removed and the next invocation could run - but if the previous run was still in-progress, then duplicate name would prevent the second instance from launching.
With podman-2.2.0_rc2, however, the container remains even after exiting:
# podman ps -a | grep <process>
58e3adc12b3a localhost/<process>:latest 6 hours ago Exited (0) 2 hours ago <process>-daily
… anything I can check to see when removal isn’t triggering?
Steps to reproduce the issue:
-
Start a container with
--rm; -
Allow the process within the container to exit.
Describe the results you received:
Container still exists after termination, blocking the container-name from re-use.
Describe the results you expected:
Container would be erased on exit.
Output of podman version:
Version: 2.2.0-rc2
API Version: 2.1.0
Go Version: go1.15.5
Git Commit: cbdb4d54bd3dddb8b4452adbfc29ca7702b8e387
Built: Sun Nov 29 02:20:47 2020
OS/Arch: linux/amd64
Output of podman info --debug:
host:
arch: amd64
buildahVersion: 1.18.0
cgroupManager: cgroupfs
cgroupVersion: v2
conmon:
package: Unknown
path: /usr/bin/conmon
version: 'conmon version 2.0.21, commit: 35a2fa83022e56e18af7e6a865ba5d7165fa2a4a'
cpus: 8
distribution:
distribution: gentoo
version: unknown
eventLogger: file
hostname: dellr330
idMappings:
gidmap: null
uidmap: null
kernel: 5.9.6-gentoo
linkmode: dynamic
memFree: 787894272
memTotal: 33392836608
ociRuntime:
name: crun
package: Unknown
path: /usr/bin/crun
version: |-
crun version 0.16
commit: eb0145e5ad4d8207e84a327248af76663d4e50dd
spec: 1.0.0
+SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
os: linux
remoteSocket:
path: /run/podman/podman.sock
rootless: false
slirp4netns:
executable: ""
package: ""
version: ""
swapFree: 20386598912
swapTotal: 25769787392
uptime: 165h 48m 17.24s (Approximately 6.88 days)
registries:
search:
- docker.io
- docker.pkg.github.com
- quay.io
store:
configFile: /etc/containers/storage.conf
containerStore:
number: 24
paused: 0
running: 22
stopped: 2
graphDriverName: overlay
graphOptions:
overlay.ignore_chown_errors: "false"
graphRoot: /space/podman/storage
graphStatus:
Backing Filesystem: extfs
Native Overlay Diff: "true"
Supports d_type: "true"
Using metacopy: "false"
imageStore:
number: 844
runRoot: /space/podman/run
volumePath: /space/podman/volumes
version:
APIVersion: 2.1.0
Built: 1606616447
BuiltTime: Sun Nov 29 02:20:47 2020
GitCommit: cbdb4d54bd3dddb8b4452adbfc29ca7702b8e387
GoVersion: go1.15.5
OsArch: linux/amd64
Version: 2.2.0-rc2
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 31 (30 by maintainers)
I’ve put a script which invokes
stracein place ofconmon- I should be able to report the results by Tuesday morning.