I have an issue where puppet keeps starting additional instances of a
process even though it's already running. The 'control script' in
question
does have a 'status' command but I'm thinking that I'm not
properly telling
puppet that the process is ok.
From the site:
The init script’s status command must return 0 if the service is running
and a nonzero value otherwise. Ideally, these exit codes should conform to the
LSB’s
specification<http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html>
for
init script status actions, but Puppet only considers the difference
between 0 and nonzero to be relevant.
The script is exiting with 'exit 0' when the process is running and
it's
creating a .PID file for it in /var/run. If I examine 'echo $?' after
running 'service myscript status' I see 0. Is there some other
indication
that I need? Should the script *actually* return 0?
When the box in question boots, there are immediately two instances of the
service running. Over time it builds up to quite a pile.
If I run the script manually it responds as I would expect. "process is
running" and doesn't start additional instances.
puppet script:
class plugpc::local_services::x10monitor inherits plugpc::local_services
{
package
{
"x10monitor" :
ensure => "latest",
require => Package[ "mysql-server-5.1" ];
}
service
{
"x10monitor" :
ensure => "running",
enable => "true",
subscribe => Package[ "x10monitor" ],
require => [ Service[ "mysql" ], Package[
"x10monitor" ]];
}
file
{
'/etc/logrotate.d/x10monitor' :
mode => 644,
source =>
'puppet:///modules/plugpc/logrotate/x10monitor',
}
}
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/e3c410eb-0415-414f-9a0f-b8695efdadb7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.