meta-balena
meta-balena copied to clipboard
Setting WatchdogSec=0 breaks the Engine on recent Systemd versions
I set WatchdogSec=0
for the Engine on a recent balenaOS build and the Engine failed to start.
From what I see, the problem is that on newer Systemd versions, setting WatchdogSecs=0
no longer causes the env var WATCHDOG_USEC
to be set. This causes healthdog to fail with Invalid value for WATCHDOG_USEC
right upon start up: https://github.com/balena-os/healthdog-rs/blob/master/src/main.rs#L53 (So, probably the right fix is on healthdog itself.)
I think this is the Systemd commit that introduced this new behavior: https://github.com/systemd/systemd/commit/f16890f8d2e3994608274b5e46dd847d9ec3ee6a
Tried setting WatchdogSec=0
on an oldish balenaOS 2.83.21 (based on Systemd 244) and got the same error. So, this doesn't look like a recent Systemd change as I thought it was.
Checked our Jenkins workers as well, because they use WatchdogSec=0
to disable the watchdog. This is working there only because we also redefine ExecStart
so that healthdog
is not used.
In other words, using WatchdogSec=0
and healthdog
will cause problems, and this has been the case since at least a couple of years.
cc @alexgg, related to the quick conversation we had on Jellyfish about WatchdogSec=0
.
[cmfcruz] This issue has attached support thread https://jel.ly.fish/6e8b31bc-cd9a-4d50-8e36-19ef200ded77