meta-balena icon indicating copy to clipboard operation
meta-balena copied to clipboard

Setting WatchdogSec=0 breaks the Engine on recent Systemd versions

Open lmbarros opened this issue 2 years ago • 3 comments

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

lmbarros avatar Apr 19 '22 16:04 lmbarros

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.

lmbarros avatar Apr 20 '22 12:04 lmbarros

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.

lmbarros avatar Apr 20 '22 18:04 lmbarros

[cmfcruz] This issue has attached support thread https://jel.ly.fish/6e8b31bc-cd9a-4d50-8e36-19ef200ded77

jellyfish-bot avatar Apr 26 '22 10:04 jellyfish-bot