[Puppet Users] Re: how to manage a service that enables a cron

2009-11-12 Thread Arnau Bria

Hi all,

I would not like to confuse people.

What I described in OT only happens to pakiti service and not to yum.
So I suppose it's a service specific problem. It has its own init
script but must behaves diff from standrd RH service.



Cheers,
Arnau

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



[Puppet Users] Re: how to manage a service that enables a cron

2009-11-12 Thread jcbollinger



On Nov 11, 10:13 am, Arnau Bria arnaub...@pic.es wrote:
 I'm just trying to control a service that does not run a process but
 enables a cron (like yum autoupdate or pakiti).

What Bellman said.  Puppet is limited in what it can do for you if
your initscipt's status command doesn't return an accurate status.

If you have a broken initscript and you can't fix it / get it fixed,
then there are alternatives:
1) Live with the error.  Puppet will try to start the service every
time it runs.  If afterward it double-checks that the service is
running (I'm uncertain whether it does) then it will report an error.
As long as nothing else has a declared dependency on the Service then
such an error can probably be ignored.

2) You may be able to configure the Service so that Puppet doesn't
manage whether or not it's running.  Try leaving out the ensure
parameter, and if that doesn't work then try setting it to undef
(ensure = undef).  The idea is that Puppet will manage the links in /
etc/rc*.d/, but it won't try to start (or stop) the service.

With that said, it would be far better to use a correct initscript .


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



[Puppet Users] Re: how to manage a service that enables a cron

2009-11-12 Thread Arnau Bria

Hi Thomas,

that's the problem

all status return code is 0...

Thanks, going to contact developer and see if he accepts a patch.

Cheers,
Arnau

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



[Puppet Users] Re: how to manage a service that enables a cron

2009-11-11 Thread Arnau Bria

On Wed, 11 Nov 2009 07:17:05 -0800 (PST)
jcbollinger jcbollinger wrote:

Hi John,

 If your initscript supports a status argument (as RedHat-provided ones
 do) then you can instruct Puppet to use it by setting
 
   hasstatus = true
 
 on your Service resource(s).  
That's what I understood and I already have it:

service {pakiti:
enable= true,
name  = pakiti,
start = /etc/init.d/pakiti start,
status= /etc/init.d/pakiti status,
stop  = /etc/init.d/pakiti stop,
ensure= running,
hasstatus = true,
require   = Package[pakiti-client],
}

and here the test:

# /etc/init.d/pakiti status
nightly pakiti update is enabled
# /etc/init.d/pakiti stop
Disabling pakiti:  [  OK  ]
# /etc/init.d/pakiti status
nightly pakiti update is disabled

and I also stop gmond cause they are under same class, so you'll see
how puppet only restarts gmond:

# /etc/init.d/gmond stop
Shutting down GANGLIA gmond:   [  OK  ]
# /etc/init.d/gmond status
gmond is stopped




# puppetd --test --server server.domain.com
info: Caching catalog at /var/lib/puppet/localconfig.yaml
notice: Starting catalog run
notice: 
/:main/Node[ce08.domain.com]/basic_sl47_service/local_conf_services/local_conf_basic/Service[gmond]/ensure:
 ensure changed 'stopped' to 'running'
notice: Finished catalog run in 16.77 seconds

# /etc/init.d/gmond status
gmond (pid 18026) is running...
# /etc/init.d/pakiti status
nightly pakiti update is disabled



 If that's not sufficient for you then
 I'm afraid you'll have to describe your problem in more detail (the
 Puppet manifest code you're trying to use would be part of that).
I'm just trying to control a service that does not run a process but
enables a cron (like yum autoupdate or pakiti).
Do you mean that I have to use:

manifest

Specify a command to config a service, or a path to a manifest to do so.

any example avaliable?

 John
Thanks for your rpely John!
Arnau

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