Dear Maintainer,
If munin is installed in a minimal Debian bookworm container (e.g. with
"mmdebstrap --variant=minbase") that does not have a cron installed,
then it never runs.
Before systemd I would have perhaps asked that cron be added as an
explicit dependency. However, given that systemd is now a default
package then I guess systemd timers and services would be more
appropriate to include and enable (and start?).
As a starting point, the following config files have at least begun
populating /var/lib/munin with rrd files for me.
mark@mon:/etc/systemd/system$ cat munin-update.timer
[Unit]
Description=Munin Update
[Timer]
OnCalendar=*-*-* *:0/5
Persistent=true
[Install]
WantedBy=timers.target
mark@mon:/etc/systemd/system$ cat munin-update.service
[Unit]
Description=Munin Update
[Service]
User=munin
ExecStart=/usr/bin/munin-cron
Regards,
Mark
control: severity -1 important thanks Hi Mark, thanks for filling this bug report (and sorry for not having responded so long)! agreed. [...] [...] nice. did you notice any other problems / missing features without cron installed? I'm also wondering how to both ship the crontab entries for systems not running systemd while at the same preventing dual runs via systemd timer and cron. I'd appreciate pointers or insight on this! OTOH I've tagged "#1003862 munin-node fails to start on traditional sysvinit system" as wontfix, so maybe I should not bother about the non-systemd case and just drop those crontab files (or ship them as examples..)
ISTM the canonical way is exiting the cron job, like this:
% head -n 13 /etc/cron.daily/apt-compat
#!/bin/sh
set -e
# Systemd systems use a systemd timer unit which is preferable to
# run. We want to randomize the apt update and unattended-upgrade
# runs as much as possible to avoid hitting the mirrors all at the
# same time. The systemd time is better at this than the fixed
# cron.daily time
if [ -d /run/systemd/system ]; then
exit 0
fi
Chris
ah! thank you, very much appreciated!
Or the same in the cron.d/snippet, c.f. % grep systemd /etc/cron.d/* /etc/cron.d/e2scrub_all:30 3 * * 0 root test -e /run/systemd/system || SERVICE_MODE=1 /usr/libexec/e2fsprogs/e2scrub_all_cron /etc/cron.d/e2scrub_all:10 3 * * * root test -e /run/systemd/system || SERVICE_MODE=1 /sbin/e2scrub_all -A -r /etc/cron.d/php:09,39 * * * * root [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi Cheers, gregor