swarm-bao: let the journald receiver read the host-linked journal

The container's collector has never shipped a line. `journalctl --follow`
— which the journald receiver passes unconditionally — scopes itself to
the current boot unless `--merge` is given too, and `--link-journal=host`
makes /var/log/journal the HOST's journal tree, where this container's
current boot has no entry. journalctl exited 1 with "No journal boot
entry found for the specified boot (+0)" and the receiver respawned it
every ~2s, so nothing was ever read and nothing was ever exported.

`merge = true` is the receiver's key for `--merge` (buildArgs() in
pkg/stanza/operator/input/journald/config_linux.go at tag
receiver/journaldreceiver/v0.151.0, the deployed collector's version),
and --merge is what clears the implicit boot scope in journalctl.c
(systemd v260.4, the version on the host).

The module-eval arm pins both halves: the boot filter is gone AND the
directory is still the host-linked one — either alone is satisfiable by
the broken config.
This commit is contained in:
atlas 2026-09-23 23:19:31 +02:00
commit c0c031a5e4
2 changed files with 25 additions and 0 deletions

View file

@ -2530,6 +2530,12 @@ in
# this machine id. Dropping this line leaves a collector that
# validates, starts, reports healthy and forwards nothing.
directory = "/var/log/journal";
# ⚠️ `--merge`, and it is what makes this receiver read
# anything at all: `journalctl --follow` scopes itself to the
# current boot, which has no entry under the host's journal
# tree — so every start died with "No journal boot entry found
# for the specified boot (+0)" in a ~2s crash-loop.
merge = true;
storage = "file_storage";
};