<div dir="ltr">
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><font face="arial, helvetica, sans-serif"><span style="color:rgb(34,34,34);background:white">Hi</span><span style="color:rgb(34,34,34)"><br style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<span style="background:white"><span style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;float:none;word-spacing:0px">Currently it appears that systemd does not provide a way to
put max time limit for system reboot.</span></span></span></font></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><font face="arial, helvetica, sans-serif"><span style="color:rgb(34,34,34)"><span style="background:white"><span style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;float:none;word-spacing:0px">So there is no way to get system reboot within specified time limit even if hardware watchdog is present in system.</span></span></span></font></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><font face="arial, helvetica, sans-serif"><span style="color:rgb(34,34,34)"><span style="background:white"><span style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;float:none;word-spacing:0px"><br></span></span></span></font></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><font face="arial, helvetica, sans-serif"><span style="color:rgb(34,34,34)">
<span style="background:white">Using RunTimeWatchDogSec,ShutDownTimeWatchDogSec
and JobTimeoutSec,JobTimeoutAction= in shutdown.target will not solve this
issue.</span></span><br style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<br style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<span style="background:white"><span style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;float:none;word-spacing:0px">RunTimeWatchDogSec configures hardware watchdog (hw wd
)with the given timeout value and system manager will pat the wd at least once
in half of that time.</span></span><br style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<span style="background:white"><span style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;float:none;word-spacing:0px">This wd patting will be done in 1st phase of shutdown also.</span></span><br style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<span style="background:white"><span style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;float:none;word-spacing:0px">example: set this to 2 min and hw wd gets configured with 2
min timeout and system manager keeps patting every 1min.</span></span><br style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<br style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<span style="background:white"><span style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;float:none;word-spacing:0px">ShutDownTimeWatchDogSec will configured HW WD with given
value and pats the WD during 2nd phase of shutdown.</span></span><br style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<span style="background:white"><span style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;float:none;word-spacing:0px">2nd phase of shutdown contains loop of 'try to clean up
remaining things'</span>.<span></span></span></font></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><font face="arial, helvetica, sans-serif"><span style="color:rgb(34,34,34);background:white">So for ex, if we set ShutDownTimeWatchDogSec to 10 min, then
during 2nd phase of shutdown , if any task of 'try to clean up remaining things'</span>
in the loop takes more than 10 min, then only HW WD get fired and system
reboots.<span></span></font></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><span style="color:rgb(34,34,34)"><font face="arial, helvetica, sans-serif">So
this puts max time out on each iteration of loop and not on entire loop<span></span></font></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><span style="color:rgb(34,34,34)"><font face="arial, helvetica, sans-serif">So
this setting does not help in putting max time out for 2nd phase of shutdown.<span></span></font></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><span style="color:rgb(34,34,34)"><span><font face="arial, helvetica, sans-serif"> </font></span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><span style="color:rgb(34,34,34)"><font face="arial, helvetica, sans-serif">But
intention of <span style="background:white">ShutDownTimeWatchDogSec <span> </span>from man page is : “It works as a safety net
to ensure that the reboot takes place even if a clean reboot attempt times out.</span>”<span></span></font></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><font face="arial, helvetica, sans-serif"><span style="color:rgb(34,34,34);background:white">Clearly this intention is not served by current
implementation of ShutDownTimeWatchDogSec</span><span style="color:rgb(34,34,34)">.<span></span></span></font></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><span style="color:rgb(34,34,34)"><span><font face="arial, helvetica, sans-serif"> </font></span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><span style="color:rgb(34,34,34)"><font face="arial, helvetica, sans-serif">Do
we need to :<span></span></font></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><span style="color:rgb(34,34,34)"><font face="arial, helvetica, sans-serif">redefine
<span style="background:white">ShutDownTimeWatchDogSec and use it to put max
time out on entire 2nd part of shutdown.<span></span></span></font></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><span style="color:rgb(34,34,34);background:white"><font face="arial, helvetica, sans-serif">i.e set the user given value of ShutDownTimeWatchDogSec to HW
WD at beginning of 2nd phase of shutdown but do not pat HW WD each time in in
each iteration of loop.<span></span></font></span></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><span style="color:rgb(34,34,34);background:white"><font face="arial, helvetica, sans-serif">this way, if 2nd phase takes more than 10 min, then hw wd gets fired and system reboots.</font></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><span style="color:rgb(34,34,34);background:white"><font face="arial, helvetica, sans-serif"> </font></span></p><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt"><span style="color:rgb(34,34,34)"><font face="arial, helvetica, sans-serif">please let me know if we need to open a bug for this<br></font>
<span style="font-family:Arial,sans-serif"> </span><br>
<br style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<span style="font-family:Arial,sans-serif;background:white"><span style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;float:none;word-spacing:0px">1) related write up <span></span></span></span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><a href="https://utcc.utoronto.ca/~cks/space/blog/linux/SystemdNFSMountShutdown" style="color:rgb(5,99,193);text-decoration:underline"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:rgb(3,102,214);background:white">https://utcc.utoronto.ca/~cks/space/blog/linux/SystemdNFSMountShutdown</span></a><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:rgb(36,41,46)"><br style="box-sizing:border-box;font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
</span><a href="https://utcc.utoronto.ca/~cks/space/blog/linux/SystemdShutdownWatchdog" style="box-sizing:border-box;font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;word-spacing:0px;color:rgb(5,99,193);text-decoration:underline"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:rgb(3,102,214);background:white">https://utcc.utoronto.ca/~cks/space/blog/linux/SystemdShutdownWatchdog</span></a><span style="font-family:Arial,sans-serif;color:rgb(34,34,34);background:white"> <span></span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-family:Arial,sans-serif;color:rgb(34,34,34);background:white"><span> </span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-family:Arial,sans-serif;color:rgb(34,34,34);background:white">2) my previous queries related to this are</span><span style="font-family:Arial,sans-serif;color:rgb(34,34,34)"><br style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<br style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<span style="background:white"><span style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;float:none;word-spacing:0px"><a href="https://lists.freedesktop.org/archives/systemd-devel/2018-March/040566.html">https://lists.freedesktop.org/archives/systemd-devel/2018-March/040566.html</a></span></span><br style="font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px">
<span style="background:white"><a href="https://github.com/systemd/systemd/issues/8484" style="color:rgb(5,99,193);text-decoration:underline">https://github.com/systemd/systemd/issues/8484</a><span></span></span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-family:Arial,sans-serif;color:rgb(34,34,34);background:white"><span> </span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-family:Arial,sans-serif;color:rgb(34,34,34);background:white">Thanks<span></span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<br></div>