scheduled reboot reboots immediately if dbus or logind is not available
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
Medium
|
Ioanna Alifieraki | ||
Bionic |
Fix Released
|
Medium
|
Ioanna Alifieraki | ||
Focal |
Fix Released
|
Medium
|
Ioanna Alifieraki | ||
Groovy |
Fix Released
|
Medium
|
Ioanna Alifieraki |
Bug Description
[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:/
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:/
a PR ( https:/
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 PLAN]
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.freedeskto
Failed to call ScheduleShutdown in logind, proceeding with immediate shutdown: Connection timed out
Connection to groovy closed by remote host.
Connection to groovy closed.
After this patch is applied the shutdown command does not reboot immediately if it fails to schedule the shutdown. Instead it does nothing
and returns a non zero return code that can be checked by calling scripts or users.
[WHERE PROBLEM COULD OCCUR]
This patch changes the behaviour of scheduled reboot in case logind or dbus has failed.
Originally, if logind is not available (call to logind bus fails
https:/
it proceeds with immediate shutdown.
This patch changes this behaviour and instead of shutting down it does nothing.
The actual regression potential is a user asking for a reboot and not getting it, so the largest regression potential is any existing users (human or programmatic) that are requesting a scheduled shutdown but not checking the return value for error.
Any other regression would likely result in the system incorrectly not rebooted, or incorrectly scheduled for reboot.
[OTHER]
This is now fixed in H, currently affects B,G,F.
Debian bug reports :
https:/
https:/
Upstream issue : https:/
PR : https:/
tags: | added: sts |
Changed in systemd (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Ioanna Alifieraki (joalif) |
description: | updated |
description: | updated |
Changed in systemd (Ubuntu): | |
status: | Confirmed → In Progress |
status: | In Progress → Confirmed |
Changed in systemd (Ubuntu Bionic): | |
importance: | Undecided → Medium |
Changed in systemd (Ubuntu Focal): | |
importance: | Undecided → Medium |
Changed in systemd (Ubuntu Groovy): | |
importance: | Undecided → Medium |
description: | updated |
tags: | added: sts-sponsors-ddstreet |
Changed in systemd (Ubuntu Focal): | |
status: | Confirmed → In Progress |
Changed in systemd (Ubuntu Groovy): | |
status: | Confirmed → In Progress |
Changed in systemd (Ubuntu Bionic): | |
status: | Confirmed → In Progress |
assignee: | nobody → Ioanna Alifieraki (joalif) |
Changed in systemd (Ubuntu Focal): | |
assignee: | nobody → Ioanna Alifieraki (joalif) |
Changed in systemd (Ubuntu Focal): | |
assignee: | Ioanna Alifieraki (joalif) → Dan Streetman (ddstreet) |
Changed in systemd (Ubuntu Groovy): | |
assignee: | nobody → Ioanna Alifieraki (joalif) |
Changed in systemd (Ubuntu Focal): | |
assignee: | Dan Streetman (ddstreet) → Ioanna Alifieraki (joalif) |
Changed in systemd (Ubuntu): | |
status: | Confirmed → Fix Released |
tags: | removed: sts-sponsors-ddstreet |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
This is addressed in Debian and has been downstreamed to Hirsute.
The following debdiffs are to SRU it for B,G,F.