Bug 2158632

Summary: podman rm leaves running container behind
Product: Red Hat Enterprise Linux 9 Reporter: Tom Sweeney <tsweeney>
Component: podmanAssignee: Jindrich Novy <jnovy>
Status: CLOSED ERRATA QA Contact: Alex Jia <ajia>
Severity: high Docs Contact:
Priority: urgent    
Version: 9.2CC: ajia, arajendr, bbaude, dornelas, dwalsh, fandrieu, gscrivan, jligon, jnovy, lsm5, mboddu, mheon, pthomas, tsweeney, umohnani, ypu
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: podman-4.4.0-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2155828
: 2158636 (view as bug list) Environment:
Last Closed: 2023-05-09 07:41:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2155828    
Bug Blocks: 2158636    

Comment 11 Alex Jia 2023-02-13 09:29:49 UTC
This bug has been verified on podman-4.4.0-1.el9.x86_64.

[root@kvm-01-guest01 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 9.2 Beta (Plow)

[root@kvm-01-guest01 ~]# rpm -q podman crun systemd kernel
podman-4.4.0-1.el9.x86_64
crun-1.8-1.el9.x86_64
systemd-252-4.el9.x86_64
kernel-5.14.0-252.el9.x86_64

[root@kvm-01-guest01 ~]# (
podman run -d --name test_remove --health-cmd /bin/false --health-interval 5s --health-retries 1 --health-timeout 1s --health-on-failure=stop --health-start-period 5s --stop-signal SIGTERM ubi8 sleep infinity
sleep 8
ps -ef|grep sleep
podman ps -a
podman rm test_remove --force
)
Resolved "ubi8" as an alias (/etc/containers/registries.conf.d/001-rhel-shortnames.conf)
Trying to pull registry.access.redhat.com/ubi8:latest...
Getting image source signatures
Checking if image destination supports signatures
Copying blob ea0a20a2c448 skipped: already exists  
Copying config 55e87c8c55 done  
Writing manifest to image destination
Storing signatures
dcc9751e0dec13a5110245e10260f72ff9f370d05f630dbab2fe73702eedf1a9
root       24065   24063  0 04:27 ?        00:00:00 /usr/bin/coreutils --coreutils-prog-shebang=sleep /usr/bin/sleep infinity
root       24083   13331  0 04:27 ?        00:00:00 sleep 5
root       24098   23954  0 04:28 pts/0    00:00:00 grep --color=auto sleep
CONTAINER ID  IMAGE                                   COMMAND         CREATED        STATUS                PORTS       NAMES
dcc9751e0dec  registry.access.redhat.com/ubi8:latest  sleep infinity  8 seconds ago  Stopping (unhealthy)              test_remove
test_remove
[root@kvm-01-guest01 ~]# podman ps -a
CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES
[root@kvm-01-guest01 ~]# ps -fww 24065
UID          PID    PPID  C STIME TTY      STAT   TIME CMD

Comment 13 errata-xmlrpc 2023-05-09 07:41:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: podman security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:2282