initctl: lacks proper exit codes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart |
Triaged
|
Medium
|
Unassigned | ||
upstart (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
Binary package hint: upstart
Puppet currently lacks knowledge of Upstart, so continues to operate on everything via the legacy sysvinit init scripts.
Puppet optionally can be told that the init script supports a "status" parameter, and then expects the init script to exit non-zero, per LSB 3.1
Currently, a service is using an Upstart job, but has the legacy initscript interface, the "status" parameter exits 0, regardless of the state of the service.
For example (using Lucid):
$ sudo /etc/init.d/gssd status
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service gssd status
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the status(8) utility, e.g. status gssd
gssd start/running, process 24250
$ echo $?
0
$ sudo /etc/init.d/gssd stop
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service gssd stop
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 gssd
gssd stop/waiting
$ sudo /etc/init.d/gssd status
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service gssd status
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the status(8) utility, e.g. status gssd
gssd stop/waiting
$ echo $?
0
Compare this with Postfix, which is not using Upstart:
$ echo $?
0
$ sudo /etc/init.d/postfix status
* postfix is not running
$ echo $?
3
$ sudo /etc/init.d/postfix start
* Starting Postfix Mail Transport Agent postfix [ OK ]
$ sudo /etc/init.d/postfix status
* postfix is running
$ echo $?
0
There are similar issues with the Upstart-provided utilities:
$ sudo status gssd
gssd stop/waiting
$ echo $?
0
$ sudo service gssd start
gssd start/running, process 28011
$ sudo status gssd
gssd start/running, process 28011
$ echo $?
0
Obviously only services that have Upstart jobs are visible via this interface.
summary: |
- Lack of exit codes + initctl: lacks proper exit codes |
Changed in upstart (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in upstart: | |
status: | New → Triaged |
importance: | Undecided → Medium |
For sanity's sake, I'm closing the Ubuntu tasks for upstream Upstart bugs. I've experimented with having both, but it is just making bugs hard to find now. Will use the policy whereby bugs on the Ubuntu package exist in the Ubuntu packaging or patches only, any bugs in the Upstart code are Upstream bugs.