'reboot now' reverting to maintenance mode, instead of rebooting
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | upstart |
High
|
Unassigned | ||
| | upstart (Ubuntu) |
Critical
|
Dimitri John Ledkov | ||
| | Trusty |
Critical
|
Dimitri John Ledkov | ||
Bug Description
[Impact]
* reboot(8) command has behaviour different from the documented one, in particular when passing optional REBOOTCOMMAND argument, whilst not in runlevel 0 or 6 and without passing --force, shutdown(8) was not invoked with the appropriate arguments. Actual behaviour was dropping to runlevel 1, instead of the expected reboot.
[Test Case]
* Whilst booted normally to runlevel 2, after executing:
$ sudo reboot please
* machine should complete reboot.
Related branches
- Dimitri John Ledkov: Disapprove on 2014-05-09
-
Diff: 26 lines (+8/-0)2 files modifieddebian/changelog (+7/-0)
util/reboot.c (+1/-0)
- James Hunt: Approve on 2014-05-15
-
Diff: 28 lines (+9/-1)2 files modifiedChangeLog (+8/-0)
util/reboot.c (+1/-1)
| Dimitri Pappas (fragtion) wrote : | #2 |
| Launchpad Janitor (janitor) wrote : | #3 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in upstart (Ubuntu): | |
| status: | New → Confirmed |
Also happening to me - same symptoms. Updated server to 13.04.
MOTD still says "New release '13.04' available"
"reboot" command on its own works fine - it displays the following:
Rather than invoking init scripts through /etc/init.d, use ther service(8)
utility, e.g. service S35networking stop
initctl: Unknown job: S35networking
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) utility, e.g. stop S35networking
"reboot now" comes up with a 'fail' when killing all remaining processes and then a prompt:
Give root password for maintenance
screenshot attached.
| James Hunt (jamesodhunt) wrote : | #5 |
"shutdown now" is supposed to switch to single-user mode (see bug 1065851).
"reboot now" is invalid - the shutdown command takes a time parameter (such as "now"), but the reboot command does not (see the man page). By specifying "reboot now" you are asking the system to reboot by running the "now" command, which is erroneous.
| Changed in upstart (Ubuntu): | |
| status: | Confirmed → Invalid |
| Dimitri Pappas (fragtion) wrote : | #6 |
Usage: shutdown [OPTION]... TIME [MESSAGE]
Bring the system down.
Usage: reboot [OPTION]...
Reboot the system.
Just out of curiousity. Why no 'time' for reboot? These commands are similar in purpose, so one would expect that level of consistency between them
I'll also be happy go back on my previous rant which may otherwise have come across as rude, if it can be explained why 'shutdown now' does not halt the system by default. It would seem to me that 'power-off' is a far more intuitive default action to be associated with 'shutdown TIME' than merely reverting to single-user mode? Why doesn't single-user mode require an argument the way halt would anyway?
| Phillip Susi (psusi) wrote : | #7 |
Because that is how shutdown has worked for 20+ years.
| Dimitri Pappas (fragtion) wrote : | #8 |
That is the point though. If retaining conventions of the past is such an important factor, then I wonder why I could (until recently, at least) issue 'shutdown now' or 'reboot now' on any machine running debian/ubuntu, and it would complete a full power-off, or reset, respectively, each time...
If you wish to insist that, well, I was 'doing it wrong' for what could well be 20+ years in my case prior to these changes, then I am happily to concede that. However, if that is the case, then I wish know why it behaved the way I have described until these recent changes. You see, these bugs (1174272 & 1065851) were confirmed by others, implying that others have also experienced the 'unexpected' (unintuivie/
| Dimitri Pappas (fragtion) wrote : | #9 |
Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-40-
root@host1:~# reboot now
The system is going down for reboot NOW!
Welcome to Ubuntu 13.04 (GNU/Linux 3.9.0-030900rc8
root@host2:~# reboot now
The system is going down to maintenance mode NOW!
(the same for shutdown)
It would seem that, sometimes, logic is not enough proof :)
| Phillip Susi (psusi) wrote : | #10 |
It was an error in that release of upstart that has been corrected. Classic sysvinit shutdown has behaved this way because that is how unix systems have always done it.
| granthays (granthays) wrote : | #11 |
I just performed a fresh install of Ubuntu Server 13.04 i386. The initial reboot was fine, but using "sudo reboot -h now" caused this to happen. From single-user mode root I was able to run "shutdown -h now" and it booted back up fine.
So, the preferred method is just "sudo reboot" from here on out? I'm fine with it, just making sure.
| Phillip Susi (psusi) wrote : | #12 |
reboot with no arguments reboots now. shutdown -h powers off, and shutdown -r reboots, with an optional time argument. As always, Read The Friendly Manual ;)
| Peter Lehoczký (betatester07) wrote : | #13 |
same here - reboot now worked for me for years... now doesnt work after upgrade to 13.04 desktop.
| Changed in upstart (Ubuntu): | |
| status: | Invalid → Fix Released |
| Peter Matulis (petermatulis) wrote : | #14 |
Trusty is borked.
| Bizzeebeever (bizzeebeever) wrote : | #15 |
This also affects 13.10 (Saucy Salamander). Extremely aggravating, especially on a remote headless server. (Thus no screenshot.)
| Phillip Susi (psusi) wrote : | #16 |
There is no need to keep commenting on this: once again, it is not a bug, the reboot command does not take a time argument.
| Margarita Manterola (marga-9) wrote : | #17 |
Not taking an argument is one thing, failing to reboot with an error message would then be fine.
A completely different thing is showing unexpected behavior, by shutting everything down and leaving an open root console.
This is the current manual page in trusty:
----
SYNOPSIS
reboot [OPTION]... [REBOOTCOMMAND]
halt [OPTION]...
poweroff [OPTION]...
DESCRIPTION
These programs allow a system administrator to reboot, halt or poweroff the system.
When called with --force or when in runlevel 0 or 6, this tool invokes the reboot(2) system call
itself (with REBOOTCOMMAND argument passed) and directly reboots the system. Otherwise this simply
invokes the shutdown(8) tool with the appropriate arguments without passing REBOOTCOMMAND argument.
Before invoking reboot(2), a shutdown time record is first written to /var/log/wtmp
----
It says that it will simply invoke shutdown *without passing REBOOTCOMMAND*. If the command actually did that, then this bug wouldn't exist.
So, yes, it IS a bug.
| Phillip Susi (psusi) wrote : | #18 |
You are right, the man page does say it is only used with --force. Interestingly, it seems the reboot command from the old sysvinit package completely ignored this argument, not using it even with --force, despite the man page saying so. Upstart's reboot command did the same thing in precise. It was patched to try and fix this and actually do as the man page says, but it looks like the patch was wrong, and causes a shutdown without the -r switch to reboot when REBOOTCOMMAND is given without --force. What is more weird, is that the kernel doesn't actually use this REBOOTCOMMAND anyhow; it seems to have absolutely no purpose.
| Changed in upstart (Ubuntu): | |
| assignee: | nobody → Phillip Susi (psusi) |
| status: | Fix Released → In Progress |
| Changed in upstart (Ubuntu): | |
| importance: | Undecided → Critical |
| assignee: | Phillip Susi (psusi) → Dimitri John Ledkov (xnox) |
| Changed in upstart (Ubuntu Trusty): | |
| status: | New → In Progress |
| importance: | Undecided → Critical |
| assignee: | nobody → Dimitri John Ledkov (xnox) |
| description: | updated |
| description: | updated |
| summary: |
- 'reboot now' reverting to maintenance mode + 'reboot now' reverting to maintenance mode, instead of rebooting |
| Changed in upstart: | |
| status: | New → In Progress |
| assignee: | nobody → Dimitri John Ledkov (xnox) |
| importance: | Undecided → High |
| description: | updated |
| Launchpad Janitor (janitor) wrote : | #19 |
This bug was fixed in the package upstart - 1.12.1-0ubuntu10
---------------
upstart (1.12.1-0ubuntu10) utopic; urgency=medium
* Revert spurious +x -> -x change on daily upstart cron file.
* Cherrypick reboot command fix to not process REBOOTCOMMAND argument
when in runlevels 2-5 and without using force flag. (LP: #1174272)
-- Dimitri John Ledkov <email address hidden> Fri, 20 Jun 2014 12:09:51 +0100
| Changed in upstart (Ubuntu): | |
| status: | In Progress → Fix Released |
| CSRedRat (csredrat) wrote : | #20 |
When this fixed in 14.04 Trusty Tahr for 14.04.1 (24 July)?
Many "critical" bugs on ReleaseNotes Trusty Tahr page don't fixed presently: https:/
Installation bugs too:
https:/
https:/
https:/
https:/
https:/
https:/
https:/
upgrade:
https:/
https:/
https:/
and other:
https:/
https:/
https:/
https:/
https:/
https:/
https:/
Too many errors in Trusty on: http://
Please fix the most annoying bugs. It interferes with work, use and distribution advice to friends.
Hello Dimitri, or anyone else affected,
Accepted upstart into trusty-proposed. The package will build now and be available at http://
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Changed in upstart (Ubuntu Trusty): | |
| status: | In Progress → Fix Committed |
| tags: | added: verification-needed |
| Colin Watson (cjwatson) wrote : | #22 |
Hello Dimitri, or anyone else affected,
Accepted upstart into trusty-proposed. The package will build now and be available at http://
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| david (oddwheel) wrote : | #23 |
Hello everyone, I tested the proposed package using the test case provided
Ubuntu Trusty amd64
upstart (12.1.1-0ubuntu4.2)
machine rebooted OK, without dropping to runlevel 1
I haven't tested the package in any other ways, so i'm not sure about regression and 'll keep verification-needed tag
| Dimitri John Ledkov (xnox) wrote : | #24 |
`$ sudo reboot please` now correctly reboots machine, instead of erroneously dropping to runlevel 1.
| tags: |
added: verification-done removed: verification-needed |
| Dimitri Pappas (fragtion) wrote : | #25 |
Thanks for implementing this fix. I have not had time to test it myself yet
I do notice however that verification-needed has been removed already, on the basis of 'reboot please' working. What about 'reboot now' -- does this also work as expected? Remember that this bug report was specifically opened/filed on the basis of 'reboot now'...
If 'reboot now' is working also, then we can surely consider this resolved.
| david (oddwheel) wrote : | #26 |
reboot now works OK too
| Changed in upstart: | |
| status: | In Progress → Fix Released |
| Launchpad Janitor (janitor) wrote : | #27 |
This bug was fixed in the package upstart - 1.12.1-0ubuntu4.2
---------------
upstart (1.12.1-0ubuntu4.2) trusty; urgency=medium
* Safe guard against SESSIONTYPE-less sessions. (LP: #1343905)
upstart (1.12.1-0ubuntu4.1) trusty; urgency=medium
[ James Hunt ] LP: #1317727
* debian/
* debian/
* init/man/init.8: Add missing information on '--chroot-
* debian/
[ Iain Lane ]
* xsession-init: Set $GNOME_
gnome-session session. Some applications (Qt4) require this to be set to
any value to detect the environment in use. It was historically set by
gnome-session but now this is no longer the root of the session so not all
user processes are guaranteed to have it. (LP: #1305294)
[ Dimitri John Ledkov ]
* Cherrypick reboot command fix to not process REBOOTCOMMAND argument
when in runlevels 2-5 and without using force flag. (LP: #1174272)
-- Dimitri John Ledkov <email address hidden> Fri, 18 Jul 2014 10:27:27 +0100
| Changed in upstart (Ubuntu Trusty): | |
| status: | Fix Committed → Fix Released |
| Adam Conrad (adconrad) wrote : Update Released | #28 |
The verification of the Stable Release Update for upstart has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
| Changed in upstart: | |
| assignee: | Dimitri John Ledkov (xnox) → nobody |


Actually just exoerienced this same symptom on a machine running 12.04.2, on 'shutdown now' went into maintenance console. Is this normal ?