Bug 2158636

Summary: podman rm leaves running container behind [rhel-9.1.0.z]
Product: Red Hat Enterprise Linux 9 Reporter: RHEL Program Management Team <pgm-rhel-tools>
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.2.0-10.el9_1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2158632 Environment:
Last Closed: 2023-02-28 08:21:38 UTC Type: ---
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: 2158632    
Bug Blocks:    

Comment 3 Giuseppe Scrivano 2023-01-10 10:20:42 UTC
backport: https://github.com/containers/podman/pull/17052

Comment 4 Alex Jia 2023-01-12 03:19:02 UTC
This bug has been verified on podman-4.2.0-10.el9_1.x86_64.

[root@ibm-x3250m6-04 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 9.1 (Plow)

[root@ibm-x3250m6-04 ~]# rpm -q podman crun systemd kernel
podman-4.2.0-10.el9_1.x86_64
crun-1.7.2-2.el9.x86_64
systemd-250-12.el9_1.1.x86_64
kernel-5.14.0-162.12.1.el9_1.x86_64

[root@ibm-x3250m6-04 podman]# git branch
  main
* v4.2.0-rhel
[root@ibm-x3250m6-04 podman]# bats test/system/055-rm.bats 
055-rm.bats
 ✓ podman rm
 ✓ podman rm - running container, w/o and w/ force
 ✓ podman rm container from storage
 ✓ podman rm <-> run --rm race
 ✓ podman rm --depend
 ✓ podman rm -f
 ✓ podman container rm --force bogus
 ✓ podman container rm doesn't affect stopping containers
 ✓ podman container rm --force doesn't leave running processes

9 tests, 0 failures

Comment 10 Alex Jia 2023-02-13 12:33:57 UTC
This bug has been verified on podman-4.2.0-11.el9_1.x86_64.

[root@kvm-04-guest23 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 9.1 (Plow)

[root@kvm-04-guest23 ~]# rpm -q podman crun buildah systemd kernel
podman-4.2.0-11.el9_1.x86_64
crun-1.5-1.el9.x86_64
buildah-1.27.3-1.el9_1.x86_64
systemd-250-12.el9_1.2.x86_64
kernel-5.14.0-162.17.1.el9_1.x86_64

[root@kvm-04-guest23 ~]# cd podman/
[root@kvm-04-guest23 podman]# git branch
  main
* v4.2.0-rhel

[root@kvm-04-guest23 podman]# git rev-parse HEAD
1a116d108e730aea8de2a53c62768e06b2c4efbc

[root@kvm-04-guest23 podman]# bats test/system/055-rm.bats 
055-rm.bats
 ✓ podman rm
 ✓ podman rm - running container, w/o and w/ force
 ✓ podman rm container from storage
 ✓ podman rm <-> run --rm race
 ✓ podman rm --depend
 ✓ podman rm -f
 ✓ podman container rm --force bogus
 ✓ podman container rm doesn't affect stopping containers
 ✓ podman container rm --force doesn't leave running processes

9 tests, 0 failures

Comment 14 errata-xmlrpc 2023-02-28 08:21:38 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 (podman bug fix and enhancement 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/RHBA-2023:0969