Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Removing podman-2:4.0.2-6.module+el8.6.0+14877+f643d2d6.x86_64 does not remove podman socket if sudo systemctl enable podman.socket has been run prior to yum remove podman
Description of problem:
If podman-2:4.0.2-6.module+el8.6.0+14877+f643d2d6.x86_64 is installed and the podman socket is enabled via systemctl, on yum remove podman the podman.socket remains.
Version-Release number of selected component (if applicable):
podman-2:4.0.2-6.module+el8.6.0+14877+f643d2d6.x86_64
How reproducible:
always
Steps to Reproduce:
1. yum install podman-2:4.0.2-6.module+el8.6.0+14877+f643d2d6.x86_64
2. sudo systemctl enable podman.socket
3. yum remove podman-2:4.0.2-6.module+el8.6.0+14877+f643d2d6.x86_64
4. ls -l /etc/systemd/system/sockets.target.wants
total 0
lrwxrwxrwx. 1 root root 39 May 19 2021 dm-event.socket -> /usr/lib/systemd/system/dm-event.socket
lrwxrwxrwx. 1 root root 37 Jun 16 11:06 podman.socket -> /usr/lib/systemd/system/podman.socket
Actual results:
socket still persists
Expected results:
socket should be removed
Additional info:
N/A
Makes sense. I changed it to:
%postun
if [ $1 == 0 ]; then
systemctl stop podman.socket > /dev/null 2>&1
systemctl disable podman.socket > /dev/null 2>&1
fi
:
to assure it's executed on removal only.
Now, the last question - does it make sense to run this before or after podman package removal? Assuming in %postun, not %preun to not to step on podman's (still installed) feet?
I would think it has to be PREUN, since those commands are likely (POtentially) to execute podman commands.
Do we need to do
systemctl stop podman.service
systemctl disable podman.service
as well.
Checked with podman-2:4.1.1-6.module+el8.7.0+15895+a6753917.x86_64 and after remove the podman rpm, the podman.socket files are clean up as expected. More details:
Output from step 4:
[root@sweetpig-21 ~]# ls -l /etc/systemd/system/sockets.target.wants
total 0
lrwxrwxrwx. 1 root root 39 Jul 15 05:55 dm-event.socket -> /usr/lib/systemd/system/dm-event.socket
lrwxrwxrwx. 1 root root 39 Jul 15 05:55 sssd-kcm.socket -> /usr/lib/systemd/system/sssd-kcm.socket
[root@sweetpig-21 ~]# ls /usr/lib/systemd/system/podman.socket
ls: cannot access '/usr/lib/systemd/system/podman.socket': No such file or directory
So set Tested flag.
Tested with podman-2:4.2.0-1.module+el8.7.0+16493+89f82ab8.x86_64 and the output from step 4:
# ls -l /etc/systemd/system/sockets.target.wants
total 0
lrwxrwxrwx. 1 root root 39 Aug 29 09:39 dm-event.socket -> /usr/lib/systemd/system/dm-event.socket
lrwxrwxrwx. 1 root root 39 Aug 29 09:39 sssd-kcm.socket -> /usr/lib/systemd/system/sssd-kcm.socket
So move it to verified.
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: container-tools:rhel8 security, 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/RHSA-2022:7457