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 2042313 - needs-restarting could check boot time with /proc/uptime not with /proc/stat
Summary: needs-restarting could check boot time with /proc/uptime not with /proc/stat
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum-utils
Version: 7.9
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Nicola Sella
QA Contact: swm-qe
Mariya Pershina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-19 08:48 UTC by alex
Modified: 2022-01-27 07:24 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
.The `needs-restarting` command from `yum-utils` might fail to display the container boot time In certain RHEL 7 container environments, the `needs-restarting` command from the `yum-utils` package might incorrectly display the host boot time instead of the container boot time. As a consequence, this command might still report a false reboot warning message after you restart the container environment. You can safely ignore this harmless warning message in such a case.
Clone Of:
Environment:
Last Closed: 2022-01-27 07:24:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-108672 0 None None None 2022-01-19 08:55:52 UTC

Description alex 2022-01-19 08:48:37 UTC
Description of problem:

needs-restarting checks /proc/stat for boot time. In some container environments (I'm using LXC on Proxmox), this shows the host boot time, not the container time.

uptime gets the correct boot time by using /proc/uptime.

Although maybe this would be a bug in the container environment, I believe it would be simpler if needs-restarting behaved consistently with the uptime command.

Given the age of EL7, though, I understand this is probably not going to change- I'm mostly filing this bug to document this issue.

Version-Release number of selected component (if applicable):

procps-ng-3.3.10-28.el7.x86_64

How reproducible:

Installing openssl updates makes needs-restart show a reboot message that doesn't go away if you reboot.

Steps to Reproduce:
1. Install openssl updates on an LXC host
2. Check that needs-restarting suggests a reboot
3. Reboot the container
4. Check that needs-restarting still suggests a boot. Examine /proc/stat and /proc/uptime of both host and container.

Actual results:

A restart doesn't clear the warning.

Expected results:

A restart should clear the warning.

Comment 3 alex 2022-01-19 08:50:32 UTC
If there's a possibility that a patch changing this would be accepted (or some other fix), I could give it a go.

Comment 5 Lenka Špačková 2022-01-26 16:33:33 UTC
Known issue published in the RHEL 7.9 Release notes:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html-single/7.9_release_notes/index#BZ-2042313

Thank you all for your work!

Comment 6 Jaroslav Mracek 2022-01-27 07:24:19 UTC
I am closing the bug because the release note was released.


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