On redhat systems (and probably others) the init.d scripts use` pidof
-c -o $$ -o $PPID -o %PPID` to find running programs. This means that
the init scripts will ignore themselves and the programs calling them
when trying to determine if a given program is running. Thus when
puppetd calls an init script to try and restart itself or see if
itself is running the init script returns a false negative.
Though there also seem to occasionally be some exceptions to this.
Thanks
Brian
On Wed, Apr 2, 2008 at 12:31 PM, Kenton Brede <kbrede@gmail.com>
wrote:>
> I''ve got the following class that runs if I activate the repo in
> /etc/yum.conf. If I run "puppetd -t" from the command line it
will
> restart puppetd fine. If I let the class run on it''s own as a
deamon
> puppetd does not restart. The puppetmaster on the other hand does
> restart using either method. I ran the client in "--debug" but
that
> doesn''t seem to show anything of interest.
>
> I have had this error crop up before but intermittently, "Could not
> stop Service[puppet]: Execution of ''/etc/init.d/puppet
stop'' returned
> 256."
>
> Otherwise the output I get in logs is that puppetd has been restarted.
> But the PID doesn''t change. Anyone have any ideas on this one?
>
> This occurs using 0.2.4 on RHEL5.
>
> Thanks,
> Kent
>
> exec { "update_puppetmaster":
> command => "/usr/bin/yum -y update
> puppet-server puppet facter",
> onlyif =>
"/root/bin/yum_repo_check.sh",
> }
>
> # restart puppet-server and puppetd if exec runs
> service { ["puppet",
"puppetmaster"]:
> ensure => running,
> subscribe =>
Exec["update_puppetmaster"],
> }
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---