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.
Description of problem:
After updating the RHEL 8 kernel ("dnf update kernel") of a ppc64le system and rebooting, the "needs-restarting -r" or "dnf needs-restarting -r" commands indicate that a reboot is required and the return code of these commands is 1.
Version-Release number of selected component (if applicable):
RHEL 8.5, 8.6 or 8.7 on platform ppc64le
How reproducible:
always
Steps to Reproduce:
1. Install RHEL 8.5, 8.6 or 8.7 on platform ppc64le.
2. Run "needs-restarting -r" (The return code is 0, as expected).
3. Run "dnf update kernel -y" to update the RHEL kernel.
4. Run "needs-restarting -r" again (The return code is 1, as expected).
5. Reboot the system.
6. Log in and run "needs-restarting -r" again (The return code is still 1 but must be 0. See below for more details).
Actual results:
At step 6, the return code is 1 and the output will be similar to:
--->
Updating Subscription Management repositories.
Core libraries or services have been updated since boot-up:
* dbus
* dbus-daemon
* kernel
* linux-firmware
* systemd
Reboot is required to fully utilize these updates.
More information: https://access.redhat.com/solutions/27943
<---
Expected results:
At step 6, the return code is 0 and the output is:
--->
No core libraries or services have been updated since boot-up.
Reboot should not be necessary.
<---
Additional info:
I repeated the "Steps to Reproduce" on RHEL 8.6 on x86, s390x and aarch64. On these 3 hardware platforms, after a reboot following a RHEL kernel update, the return code of "needs-restarting -r" is 0, as expected.
Note: https://bugzilla.redhat.com/show_bug.cgi?id=2137935 has a similar summary and description but by testing "stat -c %y /proc/1" which shows the root cause for that bug, I can confirm that the root cause in my case is different. In other words, the output of this stat command is similar to that on not affected systems, and the output of the "uptime" command is as expected on all the systems I tested.
I ran more tests and found:
I rebooted the RHEL 8.5 and RHEL 8.7 ppc64le systems several days after the problem occurred and then the output of "dnf needs-restarting -r" was:
--->
No core libraries or services have been updated since boot-up.
Reboot should not be necessary.
<---
So it's probably worth testing again, with more reboots right after the initial reboot.
I have confirmed this fix resolves the problem on ppc64le:
https://github.com/rpm-software-management/dnf-plugins-core/pull/484
Based on comments, I assume this also works for aarch64 and s390x. I did also confirm it on x86_64.
This is for RHEL-8, but a comment above notes this bug affects RHEL-9 as well so we should do an update there too. Should we clone this bug for RHEL-9?
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 (dnf-plugins-core 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:7125
Description of problem: After updating the RHEL 8 kernel ("dnf update kernel") of a ppc64le system and rebooting, the "needs-restarting -r" or "dnf needs-restarting -r" commands indicate that a reboot is required and the return code of these commands is 1. Version-Release number of selected component (if applicable): RHEL 8.5, 8.6 or 8.7 on platform ppc64le How reproducible: always Steps to Reproduce: 1. Install RHEL 8.5, 8.6 or 8.7 on platform ppc64le. 2. Run "needs-restarting -r" (The return code is 0, as expected). 3. Run "dnf update kernel -y" to update the RHEL kernel. 4. Run "needs-restarting -r" again (The return code is 1, as expected). 5. Reboot the system. 6. Log in and run "needs-restarting -r" again (The return code is still 1 but must be 0. See below for more details). Actual results: At step 6, the return code is 1 and the output will be similar to: ---> Updating Subscription Management repositories. Core libraries or services have been updated since boot-up: * dbus * dbus-daemon * kernel * linux-firmware * systemd Reboot is required to fully utilize these updates. More information: https://access.redhat.com/solutions/27943 <--- Expected results: At step 6, the return code is 0 and the output is: ---> No core libraries or services have been updated since boot-up. Reboot should not be necessary. <--- Additional info: I repeated the "Steps to Reproduce" on RHEL 8.6 on x86, s390x and aarch64. On these 3 hardware platforms, after a reboot following a RHEL kernel update, the return code of "needs-restarting -r" is 0, as expected. Note: https://bugzilla.redhat.com/show_bug.cgi?id=2137935 has a similar summary and description but by testing "stat -c %y /proc/1" which shows the root cause for that bug, I can confirm that the root cause in my case is different. In other words, the output of this stat command is similar to that on not affected systems, and the output of the "uptime" command is as expected on all the systems I tested.