[systemd-devel] ShutdownWatchdogSec does not work as described
prashantkumar dhotre
prashantkumardhotre at gmail.com
Mon Mar 19 08:06:44 UTC 2018
I see another issue also wrt hardware watchdog
reboot-force seem to be overwriting the hardware watchdog timeout value.
I have changed reboot.target to make JobTimeoutSec=5sec
when system boots up i see that hardware watchdog is set to 1 min 4 sec.
but when 'systemctl reboot' timesout , reboot-force is invoked and that is
overwriting the
hardware watchdog timeout value to 4 min.
Is this a bug or I am missing some config?
Thanks
# grep -i hardware /var/tmp/j12_systemctl_reboot_jobtimeout5sec_1
Mar 18 23:42:11 re1 systemd[1]: Hardware watchdog 'iTCO_wdt', version 0
Mar 18 23:42:11 re1 systemd[1]: Set hardware watchdog to 1min 4s.
Mar 18 23:42:32 re1 systemd[1]: Set hardware watchdog to 4min.
+++++++
root at bng-evo-ptx5k-c-re1:~# cat /lib/systemd/system/reboot.target
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Reboot
Documentation=man:systemd.special(7)
DefaultDependencies=no
Requires=systemd-reboot.service
After=systemd-reboot.service
AllowIsolate=yes
#JobTimeoutSec=30min
JobTimeoutSec=5sec
JobTimeoutAction=reboot-force
[Install]
Alias=ctrl-alt-del.target
On Mon, Mar 19, 2018 at 11:41 AM, prashantkumar dhotre <
prashantkumardhotre at gmail.com> wrote:
> Hi
> I am observing that ShutdownWatchdogSec setting in system.conf
>
> In man page, for ShutdownWatchdogSec , I see :
> " It works as a safety net to ensure that the reboot takes place even if a
> clean reboot attempt times out. "
> I am not clear what is meant by 'clean reboot' and 'times out ' here
>
> For testing, I have set it to 5 sec
>
> ++++++++++++++++++++++++++++++
> root at re1:~# grep ShutdownWatchdogSec /etc/systemd/system.conf
> ShutdownWatchdogSec=5sec
> root at re1:~#
> ++++++++++++++++++++++++++++++
>
>
> and I have my.service , which on stop will sleep for few minutes
>
> ++++++++++++++++++++++++++++++
> # cat /etc/systemd/system/my.service
> [Unit]
> Description="my"
>
> [Service]
> Type=oneshot
> RemainAfterExit=yes
> ExecStart=/bin/true
> ExecStopPost=/bin/sleep 3000
> Restart=no
>
> [Install]
> WantedBy=multi-user.target
> ++++++++++++++++++++++++++++++
>
> But I dont see hardware watchdog being kicked in.
> Is this a bug in ShutdownWatchdogSec ? if not am I missing any config ?
>
> I did some research and found below links which talk about effect of
> ShutdownWatchdogSec .
>
> https://utcc.utoronto.ca/~cks/space/blog/linux/SystemdNFSMountShutdown
> https://utcc.utoronto.ca/~cks/space/blog/linux/SystemdShutdownWatchdog
>
> as described in above pages, one option seem to be to lower value of
> JobTimeoutSec
> <https://www.freedesktop.org/software/systemd/man/systemd.unit.html> in
> reboot.target but that solution is still about software watchdog and not
> about hardware watchdog.
>
>
> My requirement is to put upper bound time limit of reboot, and once upper
> limit is reached, i want to kick in hardware watchdog
>
> Could you please let me know how do I achieve this ?
>
> Thanks
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180319/e0baa2ad/attachment-0001.html>
More information about the systemd-devel
mailing list