On May 12, 11:09 am, Markus Falb <markus.f...@fasel.at> wrote:
> I have a class irqbalance with a service defined and it does not work as
> expected and thats why I am asking for advice.
>
> service { 'irqbalance':
>       ensure => running,
>       enable => true,
>       require => Package['irqbalance'],
>
> }
>
> $ puppetd --test
> does start the service (expected)
>
> $ puppetd --test --tags irqbalance
> *does not* start the service (unexpected)
> why is this?


Prior to Puppet 2.7, if a Service resource does not have "hasstatus =>
true" then Puppet will check its status by looking for its name in the
process table.  (In Puppet 2.7 the default for this parameter changed,
so you need to explicitly set hasstatus => false to get the table
lookup behavior.)

I speculate that you are running something older than 2.7 (so probably
2.6.x), and that when Puppet scans the process table to check whether
irqbalance is running, it matches on your Puppet command line "puppetd
--test --tags irqbalance".


> If I change the service (added hasstatus) to
>
> service { 'irqbalance':
>       ensure => running,
>       enable => true,
>       hasstatus => true,
>       require => Package['irqbalance'],
>
> }
>
> $ puppetd --test --tags irqbalance
> *does* start the service (expected)


And since your initscripts support it, that's the way you should have
declared the service all along.  It's much more reliable, which I
guess is why it became the default in 2.7.


John

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