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.
Bug 2166444 - dnf needs-restarting always true from RHEL 8.5 on ppc64le
Summary: dnf needs-restarting always true from RHEL 8.5 on ppc64le
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf-plugins-core
Version: 8.6
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: David Cantrell
QA Contact: swm-qe
URL:
Whiteboard:
Depends On:
Blocks: 2182157
TreeView+ depends on / blocked
 
Reported: 2023-02-01 20:27 UTC by Bernd Finger
Modified: 2023-11-14 18:06 UTC (History)
8 users (show)

Fixed In Version: dnf-plugins-core-4.0.21-21.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2182157 (view as bug list)
Environment:
Last Closed: 2023-11-14 15:49:47 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-147363 0 None None None 2023-02-01 20:28:44 UTC
Red Hat Product Errata RHBA-2023:7125 0 None None None 2023-11-14 15:49:58 UTC

Description Bernd Finger 2023-02-01 20:27:40 UTC
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.

Comment 2 Bernd Finger 2023-02-10 17:39:22 UTC
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.

Comment 7 David Cantrell 2023-03-27 16:36:30 UTC
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?

Comment 8 David Cantrell 2023-03-27 17:41:57 UTC
This is the commit to apply to dnf-plugins-core for RHEL-8:

eb0a223c84d4a065ec7b54faa28679d88aef559d
https://github.com/rpm-software-management/dnf-plugins-core

Comment 9 David Cantrell 2023-04-18 12:28:44 UTC
(In reply to David Cantrell from comment #8)
> This is the commit to apply to dnf-plugins-core for RHEL-8:
> 
> eb0a223c84d4a065ec7b54faa28679d88aef559d
> https://github.com/rpm-software-management/dnf-plugins-core

Strike this comment, this is the fix to apply to dnf-plugins-core for RHEL-8:

https://github.com/rpm-software-management/dnf-plugins-core/pull/468/commits/b8132e1e04fb44c9ef8ab7dbcea2d2b3b920be2c

To verify the fix, follow the steps to reproduce in the opening comment.  On step 6 you should get 0 back from the "dnf needs-restarting -r" command.

Comment 20 errata-xmlrpc 2023-11-14 15:49:47 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 (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


Note You need to log in before you can comment on or make changes to this bug.