Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1960437 - needs-restarting calculating wrong boot time
Summary: needs-restarting calculating wrong boot time
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: 34
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: nsella
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-13 20:44 UTC by David L. Crow
Modified: 2021-05-18 06:47 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description David L. Crow 2021-05-13 20:44:37 UTC
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:


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