]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: add ReloadCount to Manager and bump on successful reload
authorSimon Lucido <simonlucido@meta.com>
Mon, 20 Apr 2026 15:05:27 +0000 (17:05 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sun, 3 May 2026 09:23:55 +0000 (10:23 +0100)
commitd667b6b97ff45e0739d165563b896f7d80417b99
tree8be375ce91e823cf18f42c01f34118a4e9c8f4e2
parentdb28490c9f3c4146f1892509064bb8e43e78e590
core: add ReloadCount to Manager and bump on successful reload

Introduce a counter that tracks how many configuration reloads have
been successfully completed by the manager. The increment lives in
manager_reload() right after the "point of no return", so failed
reload attempts that bail out earlier (e.g. during serialization)
do not bump the counter.

It is accessible as a new ReloadCount property to
org.freedesktop.systemd1.Manager (D-Bus) and ReloadCount to
io.systemd.Manager.Describe (Varlink).

Also add an integration test for ReloadCount
that verifies that the new ReloadCount property increments by one per
daemon-reload, accumulates correctly across multiple reloads, and that
D-Bus and Varlink return identical values. Also tests that the counter
reset after a reexec.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Simon Lucido <simonlucido@meta.com>
NEWS
man/org.freedesktop.systemd1.xml
src/core/dbus-manager.c
src/core/manager.c
src/core/manager.h
src/core/varlink-manager.c
src/shared/varlink-io.systemd.Manager.c
test/units/TEST-07-PID1.reload-count.sh [new file with mode: 0755]