dnf-plugins-core/0016-Document-needs-restarting-boot-time.patch

59 lines
2.3 KiB
Diff

From 28f2f9876b85fc73f749ba347b0c280a6acbda7e Mon Sep 17 00:00:00 2001
From: Nicola Sella <nsella@redhat.com>
Date: Wed, 27 Mar 2024 16:34:11 +0100
Subject: [PATCH 2/3] Document needs-restarting boot time
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream commit: a0ac8717219a1ec9f466162e87f40afa9aa65284
Also, add a warning in the docs if the system is running in RTC
Resolves: https://issues.redhat.com/browse/RHEL-14900
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
doc/needs_restarting.rst | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/doc/needs_restarting.rst b/doc/needs_restarting.rst
index 46cbcb0..379d027 100644
--- a/doc/needs_restarting.rst
+++ b/doc/needs_restarting.rst
@@ -35,6 +35,32 @@ Description
Note that in most cases a process should survive update of its binary and libraries it is using without requiring to be restarted for proper operation. There are however specific cases when this does not apply. Separately, processes often need to be restarted to reflect security updates.
+.. note::
+ Needs restarting will try to guess the boot time using three different methods:
+
+ ``UnitsLoadStartTimestamp``
+ property on ``/org/freedesktop/systemd1``.
+ Works unless the system was not booted with systemd,
+ such as in (most) containers.
+ ``st_mtime of /proc/1``
+ Reflects the time the first process was run after booting
+ This works for all known cases except machines without
+ a RTC - they awake at the start of the epoch.
+ ``/proc/uptime``
+ Seconds field of /proc/uptime subtracted from the current time
+ Works for machines without RTC if the current time is reasonably correct.
+ Does not work on containers which share their kernel with the
+ host - there the host kernel uptime is returned
+
+
+.. warning::
+ When the system is configured to read the RTC time in the local time zone.
+ This mode cannot be fully supported. It will create various problems
+ with time zone changes and daylight saving time adjustments. The RTC
+ time is never updated, it relies on external facilities to maintain it.
+ **If at all possible, use RTC in UTC by calling**
+ ``timedatectl set-local-rtc 0``.
+
-------
Options
-------
--
2.45.0