Issue #12773 has been updated by Glenn Aaldering.
Ubuntu upstart does not support exit codes lik sysv init. If you want to know
if a service is running this can be parsed from the output of the status
command via the "start/running" or "stop/waiting" output. For example:
# start mysql
mysql start/running, process 32693
# status mysql
mysql start/running, process 32693
# stop mysql
mysql stop/waiting
# status mysql
mysql stop/waiting
According to the upstart service provider in puppet this seems to be
implemented in some way:
if (! $?.nil?) && (output =~ /start\//)
return :running
else
return :stopped
end
When the status command returns start/running with a PID but the service is not
running at all that might be the a problem within the upstart script itself. If
so, you should file a bug at launchpad for that piece of software.
----------------------------------------
Bug #12773: Service Status detection does not always work properly on Ubuntu
https://projects.puppetlabs.com/issues/12773#change-56389
Author: Hendy Irawan
Status: Needs Decision
Priority: Normal
Assignee: Hendy Irawan
Category: service
Target version:
Affected Puppet version: 2.7.10
Keywords: Ubuntu,service,status
Branch:
This stems from the fact that not all Ubuntu service status scripts use exit
code.
e.g.
$ service mysql status; echo $?
mysql stop/waiting
0
This is the case as of Ubuntu 11.10.
This makes service detection require additional "hasstatus" and "status", which
calls the service status combined with "grep 'is running'" and similar
techniques.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.