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.
If there's a possibility that a patch changing this would be accepted (or some other fix), I could give it a go.
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!
I am closing the bug because the release note was released.