Under koha-sysv the daemon(1) wrapper captures each daemon's stdout and
stderr to /var/log/koha/INSTANCE/NAME-output.log and NAME-error.log.
The systemd units sent that output to the journal instead, so
zebra-*.log, indexer-*.log, es-indexer-*.log, worker-*.log and
sip-error.log silently stopped being written on migrated hosts, and
log locations differed between the two init packages.
Use StandardOutput=append: and StandardError=append: on those six
units so the files are identical whichever package supervises the
daemons. The shipped logrotate stanza uses copytruncate, which is safe
with append-mode descriptors. The journal still records systemd's own
messages about each unit, which is what matters when one fails to
start, and README.Debian shows the drop-in for sites that prefer the
journal. Plack and the Z39.50 responder already wrote their own files.
The README, NEWS.Debian entry and koha-common(8) text that described
the journal-only behaviour are updated accordingly.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
- koha-systemd.README.Debian was written for the first prototype: it
named koha-worker-long@.service (now koha-worker-long_tasks@), said
SIP needs the sip.enabled flag file (no longer read on systemd hosts),
described coexisting with koha-common and a manual migration that the
postinst now performs. Rewrite it to describe the actual units, how
the koha-* helpers map onto them, where each configuration value is
read from, how to relax the sandboxing with a drop-in, and the
migration.
- Logging is the one visible behavioural change and was undocumented:
with koha-sysv the daemon(1) wrapper captured stdout/stderr to
/var/log/koha/INSTANCE/NAME-output.log and NAME-error.log; with
koha-systemd that output is in the journal, so zebra-*, indexer-*,
es-indexer-*, worker-* and sip-error.log are no longer written, while
everything Koha writes itself (Starman's plack.log/plack-error.log,
the log4perl files, z3950.log, the Apache vhost logs) is unchanged.
Spell that out in README.Debian, in a new koha-systemd NEWS.Debian
entry shown by apt-listchanges on upgrade, and in a "Service
management" section of the koha-common(8) man page.
- Add --enable/--disable to the koha-zebra, koha-worker, koha-indexer
and koha-es-indexer man pages.
- z3950_responder.pl's synopsis listed --config-dir twice and had lost
-c, which is still a YAZ pass-through option; put -c back.
- t/00-valid-systemd-units.t: give it the usual shebang, and ignore
every "Command ... is not executable" line from systemd-analyze rather
than only the ones for scripts in this repository. Whether starman or
/usr/share/koha/bin/... is installed on the host running the test says
nothing about the unit files, and the old filter made the test fail on
any development machine without the Koha packages.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>