You can setup a "pattern" with a regular expression to weed-out the process
list if you don't use "hasstatus"

http://docs.puppetlabs.com/references/latest/type.html#service

...but, sounds like you nailed it.



On Wed, Nov 16, 2011 at 12:18 PM, Matthew O'Connor <thegreendra...@gmail.com
> wrote:

> That fixed it.
>
> Oh, I think I see what's going on:
>
> When I run `puppet httpd.pp`, it runs `ps` and finds a process with
> `httpd` in the name and so concludes the service is running. If I rename
> the script to something else then Puppet no longer finds any process with
> 'httpd' in its name.
>
> Perhaps Puppet should have a check that prevents thinking it is the
> satisfying service?
>
> Thanks,
> Matt
>
>
> On Wed, Nov 16, 2011 at 12:54 PM, Nan Liu <n...@puppetlabs.com> wrote:
>
>> On Wed, Nov 16, 2011 at 2:14 PM, Matthew O'Connor
>> <thegreendra...@gmail.com> wrote:
>> > I looked for that. There's not any other http daemon running. The PID
>> that
>> > the first returns changes every time (now at 23052, 23139, etc.). The
>> second
>> > one never returns a PID (unless there's actually an httpd running).
>> >
>>
>> Add hasstatus so it uses service instead of ps -ef for checking the
>> service:
>>
>>   service { 'httpd':
>>     ensure => running,
>>     enable => true,
>>      hasstatus => true,
>>   }
>>
>> Thanks,
>>
>> Nan
>>
>> --
>> 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.
>>
>>
>  --
> 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.
>

-- 
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.

Reply via email to