systemd units and timers#
The units the target package installs, from systemd/*.in and
systemd/*.timer. Every service is Type=oneshot: shirudo runs no
daemon. Every service sets SyslogIdentifier=shirudo, so what it writes
to standard output and standard error reaches the journal under the same
identifier as the messages it sends to syslog, whatever the name of the
process that runs the binary. A message is in the journal once: under a
unit shirudo sends it to syslog and not to standard error as well.
Units#
Unit |
Runs |
Started by |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@bindir@ is replaced at build time. It is /usr/bin in the
packages that make -C packaging builds and $(prefix)/bin
otherwise, /usr/local/bin with the default prefix.
shirudo-initrd.service#
Setting |
Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The dracut module 90shirudo installs this unit into the initrd and
enables it there. It never runs in the root file system. No
OnFailure= or failure action is set: when the unit fails, the boot
continues.
shirudo.service#
Setting |
Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Runtime drop-in#
shirudo-gen-runtime --unit-output <file> writes a drop-in for
shirudo.service to <file> when it builds the runtime image. It
clears EnvironmentFile= and ExecStart= and runs init from the
runtime image. For a static target binary:
[Service]
EnvironmentFile=
ExecStart=
ExecStart=/run/shirudo/runtime/usr/bin/shirudo init
For a dynamic binary the drop-in starts the image’s own ELF interpreter:
[Service]
EnvironmentFile=
ExecStart=
ExecStart=/run/shirudo/runtime<interpreter> --inhibit-cache --library-path <library-path> /run/shirudo/runtime/usr/bin/shirudo init
<interpreter> is the binary’s ELF interpreter path and
<library-path> the colon-separated library directories under
/run/shirudo/runtime that the generator copied. With the drop-in
installed, /etc/shirudo/init.env and SHIRUDO_INIT_ARGS have no
effect.
The generator writes this drop-in for shirudo.service only. The
keepalive, reconcile, map-export, repository-update and tree-sync services run
@bindir@/shirudo. On a target that enforces, a shirudo binary outside
the runtime image is refused with shirudo: image state: Permission
denied and exit status 1, so each of these services needs its own
drop-in whose ExecStart= runs the runtime image’s binary. See
Boot integration.
shirudo-keepalive.service#
Setting |
Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
The keepalive is sent only when map_export.otel_endpoint,
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT or OTEL_EXPORTER_OTLP_ENDPOINT
names an endpoint, and only with its TPM quote: a run whose TPM does not
answer or does not quote fails and sends nothing. See
Keepalive.
A keepalive and a bpm tree sync do not run at once. Every target
command holds the config operation lock for its whole run, and a sync
holds it until its last operation is applied. A keepalive that starts
during a sync waits up to 30 seconds for the lock; when the sync is
still running then, that run fails and sends nothing, and the next
run of the timer tries again. A sync that fetches and applies for
minutes therefore leaves a gap of about that length in the node’s
keepalives, which a backend’s threshold for a stale node must allow
for.
shirudo-xdp-reconcile.service#
Setting |
Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
The rule 90-shirudo-xdp-reconcile.rules in
/usr/lib/udev/rules.d starts it through SYSTEMD_WANTS when a
network device other than lo appears. It is not RUN+=, because a
child of systemd-udevd inherits its seccomp filter and would get no
task mark. A veth peer moving namespace gives the initial namespace no
such event, so the timer is what catches it, within a minute. The timer
runs a pass 60 seconds after the previous one ends rather than more
often because a device that keeps refusing costs a full retry on every
pass. The unit and the rule are not in the initrd. See shirudo upatch reconcile.
shirudo-map-export.service#
Setting |
Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
The destinations come from the map_export.* settings, see
Configuration.
shirudo-bpm-repo-update.service#
Setting |
Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bpm repo update refreshes the index of every repository in
registries.d. bpm upgrade then installs, for every package
installed from a repository, the highest version in its cached index
when that version is newer than the installed one. A package pulled
directly is left alone. See
Deliver packages.
shirudo-bpm-tree-sync.service#
Setting |
Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bpm tree sync exits 0 without contacting a registry when no
upatch-tree.conf is configured.
Timers#
Timer |
Schedule |
|---|---|
|
|
|
|
|
|
|
|
|
|
Each timer starts the service of the same name and is
WantedBy=timers.target. OnUnitInactiveSec= counts from the end of
the previous run, OnUnitActiveSec= from its start.
Memory lock#
Every shirudo and shirudo-build process calls mlockall()
before it dispatches a command and exits with status 1 when that fails
(hardening: cannot lock process memory). Every service sets
LimitMEMLOCK=infinity for that reason.
Enablement#
Installer |
What it enables |
|---|---|
Target |
On install: |
Target tarball ( |
|
dracut module |
|
The operator package installs no units.