• Bug#1094661: munin: Implicit cron dependency not specified

    From Holger Levsen@21:1/5 to Mark Lawrence on Sat Apr 12 16:40:01 2025
    control: severity -1 important
    thanks

    Hi Mark,

    On Wed, Jan 29, 2025 at 09:44:34PM +0100, Mark Lawrence wrote:
    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.

    thanks for filling this bug report (and sorry for not having responded so long)!

    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?).

    agreed.

    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
    [...]
    mark@mon:/etc/systemd/system$ cat munin-update.service
    [...]

    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..)


    --
    cheers,
    Holger

    ⢀⣴⠾⠻⢶⣦⠀
    ⣾⠁⢠⠒⠀⣿⡁ holger@(debian|reproducible-builds|layer-acht).org
    ⢿⡄⠘⠷⠚⠋⠀ OpenPGP: B8BF54137B09D35CF026FE9D 091AB856069AAA1C
    ⠈⠳⣄

    The wrong Amazon is burning.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEuL9UE3sJ01zwJv6dCRq4VgaaqhwFAmf6eCQACgkQCRq4Vgaa qhwGmw//YYOq15+XXgsgrY4FPPfiSXUXF4tBQSQCJeAR4NUf8pASdXZepRuQ4t8T KmEAPRzNNw6xm+W/GXvY9Thj2Voi8EAZWcwB1Ge6BVlIHEEVGPUUo1s/0WVKlarS 0Jclgi5/ZWLCo1RnoFDqDOyVuiNiI8GZIbhzA/7wAJDZZU/W8RZR31PtqYAuG94L /02GVVvkOHZTsqa1K09eyiCrA7I9AoWG5KoOQZhe+h93PuK4/qMkuYYZoqOW0PJI Biq626LHhsBHdJsqW4bj6YuFetgCk7ZeZdplV8NK5FffYJ0FUz/aetoq0TF+l2c+ blI3X+RINe4B0wWTAET5NX/+QnLqlMfKcfrKn2/rovsnwAZ4yNJwuyu0YZQE3vvq LbUgL+eQoc0DZpnTd9qSiFlFKYbfNTJ99EmsRk4IJYAT4XB56ylkEEgW6MtJGDTG k5zW3FR5hp15rEqgpgCc/BZo/c0w96XrR3jPA4XfxRVIbKI1A0M0rSrQF+q65kXj 8uvMxGJC+IbId+999b7YsCbb4sHvL3hd5pv23y2Z1qCyyMucG6uqa0GtePKl0avL 2RvfOzaiuSQCbivKy++asV7c9yAgmqaIAsfg937Rzbh20wHurPN7HBTepQOHj0w6 kgAWcaGqPAA2jVyFIr
  • From Holger Levsen@21:1/5 to Chris Hofstaedtler on Sat Apr 12 17:20:01 2025
    On Sat, Apr 12, 2025 at 05:10:57PM +0200, Chris Hofstaedtler wrote:
    ISTM the canonical way is exiting the cron job, like this:
    if [ -d /run/systemd/system ]; then
    exit 0
    fi

    ah! thank you, very much appreciated!


    --
    cheers,
    Holger

    ⢀⣴⠾⠻⢶⣦⠀
    ⣾⠁⢠⠒⠀⣿⡁ holger@(debian|reproducible-builds|layer-acht).org
    ⢿⡄⠘⠷⠚⠋⠀ OpenPGP: B8BF54137B09D35CF026FE9D 091AB856069AAA1C
    ⠈⠳⣄

    Bananas are berries.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEuL9UE3sJ01zwJv6dCRq4VgaaqhwFAmf6g/UACgkQCRq4Vgaa qhzLEA/+PWueU6BN0QiXGSPds6BAtPB26Irxpqh1334c/VuffhWuKlNUHautBDtJ WW2l0sMjb8Wy4XRKfa5PeBI26GNZssKtovEqqB1IHheyIa+0wWewnyOQitAaKDJW +d4H0W+rX6yCYMpU00qzF1F0SKIKEwppRK/DIguwCI/PQaB3EHJYkAXFKFP/SujS 3ZSxJZgnGNso83kL/5fv0yAYZO+E5APg+D5vRgs4iYzoW78zeqWQ3W8Kk85EGJ5j 1n6lWf4Dt2VhDOGwf5cTdUw4wBrV1/wMrnDBc9lob+f3Sz12QTqnJqxX17LiILRU L0dAh/PGsIH+wbkCY5XHPcENtPuKguAUdXRs5P+5zBMRdbmCnhhugiRteacJrke/ iV7DKSS+Xsn1ZrsEqNcCZ6KNDI3hIzaWXH2SqR8Tii0A+T2t4EUTv3Mg0lsfmxZG XM7ImbHtI5AMhplipOW0oRAxcJxUZpLnpcSe5M4l/CkD/fTh/casJJGcwaNI2g+Z 66ysM67yuwov3nr/Pr+p2RIZxEJXClcrm228ciUrTkO5ga4Cqizvr5iIB3BqNgz0 3BUuBkYsKBO6gLnLR25w5da0SBpQi25gLc00+uN7mBisHJs40uEMiTdbneWiTgtj 9bpu6SGmy/4A6iDjLGPRQIyfCy
  • From gregor herrmann@21:1/5 to Chris Hofstaedtler on Sat Apr 12 18:00:01 2025
    On Sat, 12 Apr 2025 17:10:57 +0200, Chris Hofstaedtler wrote:

    On Sat, Apr 12, 2025 at 02:26:44PM +0000, Holger Levsen wrote:
    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!

    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

    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

    --
    .''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org
    : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
    `. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
    `-

    -----BEGIN PGP SIGNATURE-----

    iQKTBAEBCgB9FiEE0eExbpOnYKgQTYX6uzpoAYZJqgYFAmf6hgdfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQx RTEzMTZFOTNBNzYwQTgxMDREODVGQUJCM0E2ODAxODY0OUFBMDYACgkQuzpoAYZJ qgbnOA/9HqM3FYUFOydNqyV5TVgqdFE4uknonJNSftXPPVEnO3P+xy3QHtzVNkFz w3z83sXYaTgREZ+RSIVq2zFdgsOBvh4nIiCpgvhAtbFkPqVvOKL528a3OFhGR0MD vc1RTbHaeC6g9jniy8IxBD+d93ArFiQZ0p52XwDGfdBWlFbMyi6RB46lhUCitnxI Hl6NK2hCPyjFCjwFcOs4mEKDP3azJn7cj+tRpmbUXUJXMuOjRWncazIkdmMmgvQT gO68AKiR4aDXsTC3Vz91l2ssw3/InGLyjGdSDmXlvtbH8/9OFwYBwHQSL2QcRoE9 9vJV1gOzqJCXcXO1O2aklQ5c+Van7cQRIAx53GKehtSNuXNi3NKE8rwBr7i8iZxL Uq0C3Mg8uMxi1DTHN2FdM4fZvo+3lK/Wyni33kd646FN0kPTKDP0CTqqhCd4qHzR ceUsVf5Kh6xZjhRM7AteqffwcyNCtczx+FGx4pAv2M03NwlBgCmTByji1+KMI3CS WNWj7jMYsHYsFbSvbtFQllu/nBneTU2DER4CbgYqp94jk17XltXfgLFTvMHjirMW lxHRheCP6g+0aTuoDU/SVS5RfVQkhj6kd0AOp9NhyoUo1skzOpQ+t8mzmj+X1rxm tMHcADo8oITbOyRwD9EWEvGvYxu2PnxdUOkUwPCqt9SbrBHNPn0=
    =/Jd6
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)