Issue #23033 has been updated by Daniele Sluijters.
This can be fixed easily:
if is_true "$START" ; then
status_of_proc -p "/var/run/puppet/${NAME}.pid" "${DAEMON}" "${NAME}"
else
echo "puppetmaster not configured to start"
status_of_proc -p "/var/run/puppet/${NAME}.pid" "${DAEMON}" "${NAME}"
fi
Now we'll still log the message on the console that we're not configured to
start but also exit with a correct status code depending on if we're actually
running or not.
----------------------------------------
Bug #23033: puppetmaster init-script incorrectly reports running if configured
not to start
https://projects.puppetlabs.com/issues/23033#change-99294
* Author: Daniele Sluijters
* Status: Unreviewed
* Priority: Normal
* Assignee:
* Category: service
* Target version:
* Affected Puppet version: 3.3.1
* Keywords:
* Branch:
----------------------------------------
When the puppet master init script is called and the service is not configured
to start it exists with a 0 exit code.
According to
http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
a return code of 0 on status means the service is running.
The issue stems from this part:
status_puppet_master() {
[..]
if is_true "$START" ; then
status_of_proc -p "/var/run/puppet/${NAME}.pid" "${DAEMON}"
"${NAME}"
else
echo ""
echo "puppetmaster not configured to start"
fi
}
The issue here is that if we're not configured to start, ergo the ``else``
clause we don't actually check if it isn't running and just echo a line without
also returning a non-zero code. This should be altered so that even if we're
not configured to start we check if the process isn't actually running. If it
is we should return 0, if it isn't we should return 3 (meaning the daemon is
not running).
--
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.