<div dir="ltr"><div><div><div><div><div>Hello,<br><br></div>I am revisiting the issue (since it has been completely ignored by systemd people).<br></div>The actual attempt at fixing this issue did not succeed.<br><br></div>The official ubuntu fix does not resolve the hang.<br></div>The problem is that the unattended-upgrades script relies on /var/run being mounted, if the /var/ is a separate filesystem it gets unmounted and thus hanging the script (where it waits for the lock to be available).<br><br><br></div>Here is the official ubuntu unattended-<wbr>upgrade-<wbr>shutdown unit:<br><br><p id="gmail-yui_3_10_3_1_1488929947858_2289">[Unit]<br>
Description=<wbr>Unattended Upgrades Shutdown<br>
DefaultDependen<wbr>cies=no<br>
Before=<wbr>shutdown.<wbr>target reboot.target halt.target network.target local-fs.target<br>
Documentation=<wbr>man:unattended-<wbr>upgrade(<wbr>8)</p>
<p>[Service]<br>
Type=oneshot<br>
RemainAfterExit=yes<br>
ExecStop=<wbr>/usr/share/<wbr>unattended-<wbr>upgrades/<wbr>unattended-<wbr>upgrade-<wbr>shutdown --debug<br>
TimeoutStopSec=900</p>
<p>[Install]<br>
WantedBy=<wbr>shutdown.<wbr>target</p><p>It appears no one who is involved in this fix understands systemd (which is very worrying!).<br></p><p>How does one would fix this unit so it is ran before the file systems get unmounted?</p><p><br></p><p>Also, how does one configure systemd to have a global timeout to guarantee a reboot? Hanging on reboot is OK for a laptop but is completely unacceptable for a server.</p><p><br></p><p>Best regards.</p><p><br></p><p>Sergei.<br></p><p> <br></p></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 March 2017 at 10:21, Sergei Franco <span dir="ltr"><<a href="mailto:sergei.franco@gmail.com" target="_blank">sergei.franco@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><div><div><div><div><div>Hello,<br><br></div>I submitted similar question but it got stuck with moderators due to screen shot size.<br><br></div>The actual bug report (on ubuntu side) is here:<br><a href="https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1661611" target="_blank">https://bugs.launchpad.net/<wbr>ubuntu/+source/unattended-<wbr>upgrades/+bug/1661611</a><br><br></div>My main question is actually how to configure systemd to have global timeout on reboot, so no future services will hang it?<br><br></div>The reboots must happen regardless if systemd can start/stop services. I am even happy to wait 15 min as long as reboots do happen. Otherwise if reboots are not guaranteed it is an epic failure on design of the system.<br><br></div>Thanks a lot!<span class="HOEnZb"><font color="#888888"><br><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Sergei.<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 2 March 2017 at 04:42, Hajo Locke <span dir="ltr"><<a href="mailto:Hajo.Locke@gmx.de" target="_blank">Hajo.Locke@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello list,<br>
<br>
sometimes i have problems rebooting some machine. i think in that cases shutting down some services fails and machine stays somewhere between life and death.<br>
Unfortunately my ssh window closes at first and no reconnect is possible, it only tells "Connection refused".<br>
If this happens, then i have to do a call to someone who works in datacenter and resets my machine by hand.<br>
I would like to keep sshd alive as long as possible to reconnect and fix this by hand.<br>
How can i achive this?<br>
System is Ubuntu 16.04 with systemd 229-4ubuntu16<br>
I googled some similiar questions and tried but without success.<br>
What could i do?<br>
<br>
Thanks,<br>
Hajo<br>
______________________________<wbr>_________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org" target="_blank">systemd-devel@lists.freedeskto<wbr>p.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/systemd-devel</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>