<div dir="ltr">I see another issue also wrt hardware watchdog<div>reboot-force seem to be overwriting the hardware watchdog timeout value.</div><div><br></div><div>I have changed 

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">reboot.target</span> to make JobTimeoutSec=5sec<br>when system boots up i see that hardware watchdog is set to 1 min 4 sec.</div><div>but when 'systemctl reboot' timesout , reboot-force is invoked and that is overwriting the </div><div>

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">hardware watchdog timeout value to 4 min.</span><br></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Is this a bug or I am missing some config?</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Thanks</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div>

<br><div><div><div><br></div><div># grep -i hardware  /var/tmp/j12_systemctl_reboot_jobtimeout5sec_1</div></div><div><br></div><div>Mar 18 23:42:11 re1 systemd[1]: Hardware watchdog 'iTCO_wdt', version 0</div><div>Mar 18 23:42:11 re1 systemd[1]: Set hardware watchdog to 1min 4s.<br></div><div>Mar 18 23:42:32 re1 systemd[1]: Set hardware watchdog to 4min.</div></div><div><br></div><div>+++++++</div><div><div><br></div><div>root@bng-evo-ptx5k-c-re1:~# cat   /lib/systemd/system/reboot.target</div><div>#  This file is part of systemd.</div><div>#</div><div>#  systemd is free software; you can redistribute it and/or modify it</div><div>#  under the terms of the GNU Lesser General Public License as published by</div><div>#  the Free Software Foundation; either version 2.1 of the License, or</div><div>#  (at your option) any later version.</div><div><br></div><div>[Unit]</div><div>Description=Reboot</div><div>Documentation=man:systemd.special(7)</div><div>DefaultDependencies=no</div><div>Requires=systemd-reboot.service</div><div>After=systemd-reboot.service</div><div>AllowIsolate=yes</div><div>#JobTimeoutSec=30min</div><div>JobTimeoutSec=5sec</div><div>JobTimeoutAction=reboot-force</div><div><br></div><div>[Install]</div><div>Alias=ctrl-alt-del.target</div><div><br></div></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 19, 2018 at 11:41 AM, prashantkumar dhotre <span dir="ltr"><<a href="mailto:prashantkumardhotre@gmail.com" target="_blank">prashantkumardhotre@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi</div><div>I am observing that 



<code style="font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;color:rgb(0,0,0)">ShutdownWatchdogSec</code><span style="font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;float:none;display:inline"><span> <span> </span></span></span>

<span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span>setting in 

<span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">system.conf</span>

</span></span></div><div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></span></div><div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">In man page, for 

<code style="font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);color:rgb(0,0,0)">ShutdownWatchdogSec</code><span style="font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;float:none;display:inline"><span> <span> </span></span></span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span></span> , I see :</span></span></span></div><div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">" It works as a safety net to ensure that the reboot takes place even if a clean reboot attempt times out.</span> "<br></span></span></span></div><div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I am not clear what is meant by 'clean reboot' and 'times out ' here</span></span></span></div><div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></span></div><div><span style="text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><div><font color="#000000" face="Times New Roman" size="3">For testing, I have set it to 5 sec</font></div><div><font color="#000000" face="Times New Roman" size="3"><br></font></div><div><font color="#000000" face="Times New Roman" size="3">

<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">++++++++++++++++++++++++++++++</div>root@re1:~# grep ShutdownWatchdogSec /etc/systemd/system.conf</font></div><div><font color="#000000" face="Times New Roman" size="3">ShutdownWatchdogSec=5sec</font></div><div><font color="#000000" face="Times New Roman" size="3">root@re1:~#</font></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px">

<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">++++++++++++++++++++++++++++++</div><br class="m_-1002379654170071062gmail-Apple-interchange-newline">

<br></div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px">and I have my.service , which on stop will sleep for few minutes</div><div style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px">

<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">++++++++++++++++++++++++++++++<br></div></div></span></div><div># cat /etc/systemd/system/my.service</div><div>[Unit]</div><div>Description="my"</div><div><br></div><div>[Service]</div><div>Type=oneshot</div><div>RemainAfterExit=yes</div><div>ExecStart=/bin/true</div><div>ExecStopPost=/bin/sleep 3000</div><div>Restart=no</div><div><br></div><div>[Install]</div><div>WantedBy=multi-user.target</div><div>++++++++++++++++++++++++++++++<br></div><div><br></div><div>But I dont see hardware watchdog being kicked in.</div><div>Is this a bug in ShutdownWatchdogSec ? if not am I missing any config ?</div><div><br></div><div>I did some research and found below links which talk about effect of 

<code style="font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);color:rgb(0,0,0)">ShutdownWatchdogSec</code><span style="font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium;float:none;display:inline"><span> <span>.</span></span></span></div><div><br></div><a href="https://utcc.utoronto.ca/~cks/space/blog/linux/SystemdNFSMountShutdown" target="_blank">https://utcc.utoronto.ca/~cks/<wbr>space/blog/linux/<wbr>SystemdNFSMountShutdown</a><br><div><a href="https://utcc.utoronto.ca/~cks/space/blog/linux/SystemdShutdownWatchdog" target="_blank">https://utcc.utoronto.ca/~cks/<wbr>space/blog/linux/<wbr>SystemdShutdownWatchdog</a><br></div><div><br></div><div>as described in above pages, one option seem to be to lower value of  

<code style="font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="https://www.freedesktop.org/software/systemd/man/systemd.unit.html" style="font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">JobTimeoutSec</a> in reboot.target but that solution is still about software watchdog and not about hardware watchdog.</code></div><div><br></div><div><code style="font-family:"Times New Roman";font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></code></div><div>My requirement is to put upper bound time limit of reboot, and once upper limit is reached, i want to kick in hardware watchdog</div><div><br></div><div>Could you please let me know how do I achieve this ?</div><div><br></div><div>Thanks</div><div><br></div></div>
</blockquote></div><br></div>