Comment 0 for bug 1911187

Revision history for this message
Ioanna Alifieraki (joalif) wrote :

[IMPACT]

When, for whatever reason, logind or dbus is not available scheduled reboot reboots the machine immediately.
From the sources it seems that this is intended :
https://github.com/systemd/systemd/blob/master/src/systemctl/systemctl-logind.c#L318
However, I report this as a bug since this is against the logic of a scheduled reboot; if someone schedules a reboot they want the system to reboot at the specified time not immediately.

There has been a discussion upstream ( https://github.com/systemd/systemd/issues/17575 ) and
a PR ( https://github.com/systemd/systemd/pull/18010 ).

Upstream community is not willing to accept the patch but debian is.
I open this bug to to pull the patch into Ubuntu once it lands in debian.

[TEST CASE]

The simpler reproducer is to disable dbus to imitate the real world case.

# systemctl stop dbus.service
# systemctl stop dbus.socket
# shutdown +1140 -r "REBOOT!"
Failed to set wall message, ignoring: Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)
Failed to call ScheduleShutdown in logind, proceeding with immediate shutdown: Connection timed out
Connection to groovy closed by remote host.
Connection to groovy closed.

[REGRESSION POTENTIAL]

The patch has minimal regression potential since it just takes no action ( instead of shutting down ) when bus_call_method fails.

[OTHER]

Upstream issue : https://github.com/systemd/systemd/issues/17575
PR : https://github.com/systemd/systemd/pull/18010