[systemd-devel] hanging reboot

Sergei Franco sergei.franco at gmail.com
Wed Mar 8 00:05:20 UTC 2017


Hello,

I am revisiting the issue (since it has been completely ignored by systemd
people).
The actual attempt at fixing this issue did not succeed.

The official ubuntu fix does not resolve the hang.
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).


Here is the official ubuntu unattended-upgrade-shutdown unit:

[Unit]
Description=Unattended Upgrades Shutdown
DefaultDependencies=no
Before=shutdown.target reboot.target halt.target network.target
local-fs.target
Documentation=man:unattended-upgrade(8)

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStop=/usr/share/unattended-upgrades/unattended-upgrade-shutdown --debug
TimeoutStopSec=900

[Install]
WantedBy=shutdown.target

It appears no one who is involved in this fix understands systemd (which is
very worrying!).

How does one would fix this unit so it is ran before the file systems get
unmounted?


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.


Best regards.


Sergei.



On 2 March 2017 at 10:21, Sergei Franco <sergei.franco at gmail.com> wrote:

> Hello,
>
> I submitted similar question but it got stuck with moderators due to
> screen shot size.
>
> The actual bug report (on ubuntu side) is here:
> https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1661611
>
> My main question is actually how to configure systemd to have global
> timeout on reboot, so no future services will hang it?
>
> 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.
>
> Thanks a lot!
>
>
> Sergei.
>
> On 2 March 2017 at 04:42, Hajo Locke <Hajo.Locke at gmx.de> wrote:
>
>> Hello list,
>>
>> 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.
>> Unfortunately my ssh window closes at first and no reconnect is possible,
>> it only tells "Connection refused".
>> If this happens, then i have to do a call to someone who works in
>> datacenter and resets my machine by hand.
>> I would like to keep sshd alive as long as possible to reconnect and fix
>> this by hand.
>> How can i achive this?
>> System is Ubuntu 16.04 with systemd 229-4ubuntu16
>> I googled some similiar questions and tried but without success.
>> What could i do?
>>
>> Thanks,
>> Hajo
>> _______________________________________________
>> systemd-devel mailing list
>> systemd-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20170308/379cd3d3/attachment.html>


More information about the systemd-devel mailing list