]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: notify supervisor over targets we reach, as we reach them
authorLennart Poettering <lennart@poettering.net>
Tue, 12 Mar 2024 15:08:13 +0000 (16:08 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 14 Mar 2024 16:23:10 +0000 (17:23 +0100)
commitb2d6bb5b34c89f6db65273bd42ec54c97efa33d8
treebe507b9c0a3974d28341d242e853d0a1c7d7b9b7
parentad60cdd05093e342d2b97b57a47fc668c1505b5f
core: notify supervisor over targets we reach, as we reach them

Let's inform the the supervisor about various happenings of our service
manager, specifically the boot milestones we reach.

We so far have only a singular READY=1 message, to inform about bootup
completion. But sometimes it is interesting to have something for
finegrained, in particular something that indicates optional components
that have been activated.

Usecase for this: in a later PR I intend to introduce a generic
"ssh.target" that is supposed to be activated when SSH becomes available
on a host. A supervisor (i.e. a VMM/hypervisor/container mgr/…) can
watch for that, and know two things:

1. that SSH is generally available in the system
2. when it is available

In order to not flood the supervisor with events I only send these out
for target units. We could open this up later, in theory, but I think it
makes sense to tell people instead to define clear milestone target
units if they want a supervisor to be able to track system state.
src/core/manager.c
src/core/manager.h
src/core/target.c
src/core/unit.c
src/core/unit.h