[Bug 552786] Re: initctl: lacks proper exit codes

Dmitrijs Ledkovs launchpad at surgut.co.uk
Fri Jul 12 22:00:58 UTC 2013


Yeah, above patch will not work in saucy and up, as "upstart-job"
symlink is deprecated, and service command correctly calls into
upstart's status command to print status with upstart convention.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/552786

Title:
  initctl: lacks proper exit codes

Status in Upstart:
  Triaged
Status in “upstart” package in Ubuntu:
  Invalid

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/upstart/+bug/552786/+subscriptions




More information about the foundations-bugs mailing list