[systemd-devel] Hear opinions about changing watchdog timeout value during service running

Lennart Poettering lennart at poettering.net
Mon May 23 08:24:41 UTC 2016


On Mon, 23.05.16 11:06, 김민경/주임연구원/SW Platform(연)AOT팀(minkyung88.kim at lge.com) (minkyung88.kim at lge.com) wrote:

> Hello.
> 
> Below is usecase from our SW-Engineer.
> 
> What do you think so?

OK, makes sense.

As mentioned, I#d suggest implementing this via a new parameter to
sd_notify() that allows overriding of the watchdog timeout.

Note that it won't surfice to simply overwrite the "watchdog_usec"
field of the "Service" structure, when PID 1 sees one of these
notification messages to override the timeout, as this would then be
lost if the user invokes "systemctl daemon-reload", and it probably
should not be. Hence, please add "watchdog_override_usec" or so, which
is populated by the notification message, and if set, takes precedence
over "watchdog_usec". And watchdog_override_usec should really be
reset again on each service start. That way a service can freely
change its watchdog timeout, but if it is restarted it always starts
again with the one configured in the unit file.

Hope that makes sense!

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list