On Fri, Jul 10, 2009 at 11:00 AM, Pete Emerson<pemer...@gmail.com> wrote: > I'm trying to figure out how "ensure => running" determines whether a > service is running or not (CentOS using init controlled services). > > I have a custom service that has enable => running set on it: > > service { "foo": > ensure => running, > enable => true > } > > Every time puppet runs I see this: > > notice: //Service[foo]/ensure: ensure changed 'stopped' to 'running' > > and yet the binary is running, and my init.d script thinks it's running: > > # /etc/init.d/foo status > foo (pid 4487) is running... > # echo $? > 0 > > My guess is that I'm not doing something quite right in my init.d script as > I have other custom services that are working just fine, but since I cloned > this one from a working one, it's baffling me. How does puppet check whether > a service is running or not for an init service?
Do you need to add a hasstatus parameter? Perhaps your other init scripts were working due to process table lookups? ------------------------------ http://reductivelabs.com/trac/puppet/wiki/TypeReference#service hasstatus Declare the the service's init script has a functional status command. Based on testing, it was found that a large number of init scripts on different platforms do not support any kind of status command; thus, you must specify manually whether the service you are running has such a command (or you can specify a specific command using the status parameter). If you do not specify anything, then the service name will be looked for in the process table. Valid values are true, false. ------------------------------ > > Thanks, > Pete > > > > -- Nigel Kersten nig...@google.com System Administrator Google, Inc. --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---