systemd-cron: Notes on "multiple trigger source candidates" warning/re-parsing the systemd state in cron-mail@
In testing I just got
2023-09-09T15:05:42+0200 tarta systemd[1]: cron-mail@cron-nabijaczleweli-nabijaczleweli-1.service:nometadata.service: multiple trigger source candidates for exit status propagation (cron-nabijaczleweli-nabijaczleweli-1.service, cron-nabijaczleweli-nabijaczleweli-1.service), skipping.
I had
OnSuccess=cron-mail@cron-nabijaczleweli-nabijaczleweli-1.service:nometadata.service
OnFailure=cron-mail@cron-nabijaczleweli-nabijaczleweli-1.service:nometadata.service
Adding
ExecStartPre=/bin/sh -c 'set | grep MONITOR_'
to cron-mail@ I got
2023-09-09T15:06:34+0200 tarta sh[819555]: MONITOR_EXIT_CODE='exited'
2023-09-09T15:06:34+0200 tarta sh[819555]: MONITOR_EXIT_STATUS='0'
2023-09-09T15:06:34+0200 tarta sh[819555]: MONITOR_INVOCATION_ID='fcce2cf2a657420e9913c533aebda51f'
2023-09-09T15:06:34+0200 tarta sh[819555]: MONITOR_SERVICE_RESULT='success'
2023-09-09T15:06:34+0200 tarta sh[819555]: MONITOR_UNIT='cron-nabijaczleweli-nabijaczleweli-1.service'
Notably, we already do
systemctl show --property=User --property=Environment --property=ActiveState --property=InvocationID "$unit"
but we could only reduce it to
systemctl show --property=User --property=Environment --property=ActiveState "$unit"
so this isn’t all that great, and we’d require a super-fresh systemd (12ba65964f1849a043db42871ccbcb522bc73575) and it’d complicate tests.
We should probably just generate
OnSuccess=cron-mail@cron-nabijaczleweli-nabijaczleweli-1.service:Success:nometadata.service
OnFailure=cron-mail@cron-nabijaczleweli-nabijaczleweli-1.service:Failure:nometadata.service
to silence the warning.
It appears impossible to silence the warning otherwise.
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 21 (21 by maintainers)
Commits related to this issue
- Provide a fake sendmail in test-generator https://github.com/systemd-cron/systemd-cron/issues/120#issuecomment-1712543729 — committed to systemd-cron/systemd-cron by nabijaczleweli 10 months ago
- m_f_j: "[tarta] /etc/crontab line 22: failure", "[tarta] /etc/cron.weekly/dnsmasq-update-adblock-hosts: output", "[tarta] nabijaczleweli's crontab line 2: output" https://github.com/systemd-cron/syst... — committed to nabijaczleweli/systemd-cron by nabijaczleweli 10 months ago
- m_f_j: "[tarta] /etc/crontab line 22: failure", "[tarta] /etc/cron.weekly/dnsmasq-update-adblock-hosts: output", "[tarta] nabijaczleweli's crontab line 2: output" https://github.com/systemd-cron/syst... — committed to nabijaczleweli/systemd-cron by nabijaczleweli 10 months ago
- m_f_j: "[tarta] /etc/crontab line 22: failure", "[tarta] /etc/cron.weekly/dnsmasq-update-adblock-hosts: output", "[tarta] nabijaczleweli's crontab line 2: output" https://github.com/systemd-cron/syst... — committed to systemd-cron/systemd-cron by nabijaczleweli 10 months ago
This could go in the NEWS file.