-
Bug
-
Resolution: Unresolved
-
Major
-
rhel-9.5
-
dnf-plugins-core-4.3.0-18.el9
-
None
-
Moderate
-
rhel-sst-cs-software-management
-
ssg_core_services
-
13
-
None
-
False
-
-
Yes
-
Red Hat Enterprise Linux
-
None
-
-
Pass
-
None
-
Bug Fix
-
-
Proposed
-
None
What were you trying to do that didn't work?
After installing a critical component such as systemd or the kernel, "needs-restarting -r" still reports no reboot is necessary:
# yum -y reinstall systemd [...] # needs-restarting -r [...] No core libraries or services have been updated since boot-up. Reboot should not be necessary.
The issue happens if RTC is in local timezone, which is not recommended but supported anyway.
This is because internally the tool checks the boot time through using "stat -c %Y /proc/1" python equivalent, then compares installed packages with the boot timestamp.
Unfortunately this doesn't work because "stat -c %Y /proc/1" gets somehow adjusted by the kernel because of RTC being in local timezone.
When timezone is +something, e.g. Europe/Paris, the boot time gets computed in the future:
# date Fri Oct 27 15:15:04 CEST 2023 # stat -c %y /proc/1 2023-10-27 17:07:50.352000000 +0200 # stat -c %Y /proc/1 1698419270
The solution is to instead rely on btime field found in /proc/stat, which seems always correct:
# grep ^btime /proc/stat
btime 1698412068
Please provide the package NVR for which bug is seen:
python3-dnf-plugins-core-4.0.21-19.el8_8.noarch
How reproducible:
Always
Steps to reproduce
- Assuming TZ is >UTC (e.g. Europe/Paris) configure the system with local RTC
# timedatectl set-local-rtc 1
- Reboot
# reboot
- Reinstall systemd package
# yum -y reinstall systemd
- Execute needs-restarting -r
# needs-restarting -r
Expected results
Core libraries or services have been updated since boot-up: * systemd Reboot is required to fully utilize these updates.
Actual results
No core libraries or services have been updated since boot-up. Reboot should not be necessary.
- is cloned by
-
RHEL-35577 "needs-restarting -r" reports no reboot required if RTC is not in UTC
- In Progress
- links to
-
RHBA-2024:139955 dnf-plugins-core bug fix and enhancement update