Issue #19097 has been reported by Geoff Meakin.
----------------------------------------
Bug #19097: Puppet Provider Service Type does ugly detection of PIDs
https://projects.puppetlabs.com/issues/19097
Author: Geoff Meakin
Status: Unreviewed
Priority: Low
Assignee:
Category:
Target version:
Affected Puppet version: 2.7.20
Keywords: mcollective status puppet service down up inconsistent
Branch:
Deep in the heart of puppetland, the "status" function whose purpose is to
check whether or not a service is running, relies on this getpid function:
/usr/lib/ruby/site_ruby/1.8/puppet/provider/service/redhat.rb
def getpid
.... snip ....
regex = Regexp.new(@resource[:pattern])
... snip ...
IO.popen(ps) { |table|
table.each { |line|
if regex.match(line)
ary = line.sub(/^\s+/, '').split(/\s+/)
return ary[1]
In other words, Check if any part of the process table matches the servicename
by regexing it.
I have been tripped up by this numerous times, because for example, I am
tailing a process "tail -f my.puppet.monitoring.script.log", and this function
tells the system that puppet is running.
Obviously this is the last-chance saloon way of finding whether a service is
"alive" after trying first the hasstatus-related /sbin/service methods,
however, even as a last-chance saloon it is highly likely to fail.
--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.