reboot does not return under systemd
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Invalid
|
Low
|
Martin Pitt |
Bug Description
If you send a shutdown or reboot command over SSH to a Trusty or Utopic host, the command will consistently finish successfully prior to the SSH connection being closed, meaning your SSH client will exit with a return-code of zero:
For example:
$ ssh root@myhost shutdown -h now
$ echo $?
0
Or
$ ssh root@myhost reboot
$ echo $?
0
However, on Vivid now that the switch-over to systemd has happened, running the same consistently results in the abrupt closure of the SSH connection prior to the command finishing, meaning your SSH client will exit with a return-code of 255:
$ ssh root@my_vivid_host shutdown -h now
Connection to localhost closed by remote host.
$ echo $?
255
Although in retrospect is was a bit naive for me to rely on this (actually quite fragile) behavior, it had at least been consistent in Ubuntu for some time (back to at least Raring from my personal experience, but likely back even farther).
This isn't technically a systemd bug, but I still think it's something worth mentioning in the release notes as I bet I'm not the only person who built some "clever" hacks around the previous behavior :P
tags: | added: systemd vivid |
tags: |
added: systemd-boot removed: systemd |
Changed in systemd (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in openssh (Ubuntu): | |
status: | Confirmed → In Progress |
assignee: | nobody → Martin Pitt (pitti) |
Changed in openssh (Ubuntu): | |
importance: | Undecided → Low |
Changed in systemd (Ubuntu): | |
importance: | Undecided → Low |
no longer affects: | systemd (Ubuntu) |
Changed in openssh (Ubuntu): | |
status: | In Progress → Triaged |
tags: | added: regression-release |
description: | updated |
Status changed to 'Confirmed' because the bug affects multiple users.