Description of problem: needs-restarting -r is calculating the wrong boot time, so it is not correctly detecting a need to restart. I think this is a regression caused by the changes introduced in bug 1914251. Version-Release number of selected component (if applicable): python3-dnf-plugins-core-4.0.19-1.fc34.noarch How reproducible: every time Steps to Reproduce: These are steps that I ran just now after a new kernel was installed at 6:30a this morning. # needs-restarting -r No core libraries or services have been updated since boot-up. Reboot should not be necessary. # uptime 15:35:25 up 8 days, 6:51, 2 users, load average: 0.07, 0.07, 0.08 # ls -la /proc/1/cmdline -r--r--r-- 1 root root 0 May 13 06:59 /proc/1/cmdline # cat /proc/stat | grep btime btime 1620222248 # uname -r 5.11.17-300.fc34.x86_64 # rpm -q kernel kernel-5.11.17-300.fc34.x86_64 kernel-5.11.19-300.fc34.x86_64 Actual results: Does not indicate that a restart is necessary. Expected results: Should indicate that a restart is necessary. If I reverse apply the patch in bug 1914251 so that the boot time is calculated correctly, I receive the following output: Core libraries or services have been updated since boot-up: * glibc * kernel * systemd Additional info:
Hello, after some investigation I created this copr build.[1] Please, could you test it? Just run: dnf copr enable nsella/needs-restaring-bz1960437 dnf update dnf-plugins-core [1] https://copr.fedorainfracloud.org/coprs/nsella/needs-restaring-bz1960437/
The needs-restarting changes in the copr build seemed to have worked correctly when the latest kernel was released around July 30.
Thank you. Also, I forgot to post the PR: https://github.com/rpm-software-management/dnf-plugins-core/pull/432
FEDORA-2021-a3a73697b8 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-a3a73697b8
FEDORA-2021-a3a73697b8 has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-a3a73697b8` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-a3a73697b8 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-a3a73697b8 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.