[Puppet Users] Re: Question regarding the SERVICE type

2010-10-05 Thread D.N. van der Meijden
*ahem* ...found it PATH settings: export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" works... (with /usr/sbin/zabbix_agentd) Can't seem to get it working with /etc/zabbix/sbin/zabbix_agentd though?? On 5 okt, 14:53, "D.N. van der Meijden" wrote: > I hope I'm not spamming this group, but just tr

[Puppet Users] Re: Question regarding the SERVICE type

2010-10-05 Thread D.N. van der Meijden
I hope I'm not spamming this group, but just trying to share everything :-) I tried using a new puppet client (v2.6.1), but same results: ... debug: Loaded state in 0.00 seconds info: Applying configuration version '1286282327' debug: Service[JADDA](provider=debian): Executing '/etc/init.d/ zabbix

[Puppet Users] Re: Question regarding the SERVICE type

2010-10-05 Thread D.N. van der Meijden
By the way I tried the 'puppet' command to get some more info: client:/tmp# puppet -d -v jadda debug: file /sbin/chkconfig does not exist debug: file /usr/sbin/svcadm does not exist debug: file /sbin/rc-update does not exist debug: Creating default schedules debug: Service[zabbix_agent](provider=d

[Puppet Users] Re: Question regarding the SERVICE type

2010-10-05 Thread D.N. van der Meijden
Thanks for the extra info Nan. I've changed the init script to support the status option, but to no avail... + . /lib/lsb/init-functions + + status) + status_of_proc -p $PID && exit 0 || exit $? + ;; after this the status option works, but puppet still cannot start the daemon... as a wo

Re: [Puppet Users] Re: Question regarding the SERVICE type

2010-09-30 Thread Nan Liu
On Thu, Sep 30, 2010 at 8:46 AM, D.N. van der Meijden wrote: > Here's the init script: > > (by the way, I changed the service to rsyslog [in the zabbix manifest > file] and this works like a charm. So the service action works in > puppet...) > > #! /bin/sh > PATH=/bin:/usr/bin:/sbin:/usr/sbin:/etc

[Puppet Users] Re: Question regarding the SERVICE type

2010-09-30 Thread D.N. van der Meijden
Here's the init script: (by the way, I changed the service to rsyslog [in the zabbix manifest file] and this works like a charm. So the service action works in puppet...) #! /bin/sh PATH=/bin:/usr/bin:/sbin:/usr/sbin:/etc/zabbix:/etc/zabbix/bin:/etc/ zabbix/sbin DAEMON=/etc/zabbix/sbin/zabbix_age

Re: [Puppet Users] Re: Question regarding the SERVICE type

2010-09-30 Thread James Lucas
Hi, I previously had a similar problem trying to start a ruby app using bundler that I eventually found to be caused by the non existence of the $HOME environment variable, adding this using: environment => "HOME=/home/user" to the exec command fixed it. Could there be an environment differe

Re: [Puppet Users] Re: Question regarding the SERVICE type

2010-09-30 Thread Nigel Kersten
Can you post the init script? Is it possible it's a PATH problem inside the script? Something that works under your environment, but not under the user puppet is running as? On Thu, Sep 30, 2010 at 8:16 AM, D.N. van der Meijden wrote: > My bad!! I understand the puppet command now... > > clien

[Puppet Users] Re: Question regarding the SERVICE type

2010-09-30 Thread D.N. van der Meijden
My bad!! I understand the puppet command now... client:/tmp# puppet --verbose --debug --trace test.pp debug: file /sbin/chkconfig does not exist debug: file /usr/sbin/svcadm does not exist debug: file /sbin/rc-update does not exist debug: Creating default schedules debug: Service[zabbix_agent](pro

[Puppet Users] Re: Question regarding the SERVICE type

2010-09-30 Thread D.N. van der Meijden
My bad! Just checked out the puppet command :-s Ok, output on my client is now: client:/tmp# puppet --verbose --debug --trace test.pp debug: file /sbin/chkconfig does not exist debug: file /usr/sbin/svcadm does not exist debug: file /sbin/rc-update does not exist debug: Creating default schedules

[Puppet Users] Re: Question regarding the SERVICE type

2010-09-30 Thread luke.bigum
>From what I understand using "puppet apply" will make no attempt to contact the puppet master and so is useful for testing, but all your Puppet config files must be local. The file you are applying should be in CWD, or you can just: puppet apply [options] /wherever/test.pp As for your error outp

[Puppet Users] Re: Question regarding the SERVICE type

2010-09-30 Thread D.N. van der Meijden
No problem Luke, thanks for helping me out here. Since I'm still a puppet n00b, where should I place the test.pp? On the host I presume (I tried /etc/puppet/manifests/test.pp) ? test.pp: class test { service { "rsyslog": name => "rsyslog", enable=> true, ensure=>

[Puppet Users] Re: Question regarding the SERVICE type

2010-09-30 Thread luke.bigum
My apologies, I thought you were saying it starts but were unaware of the exit code. I'm now unsure... You could try run this: puppet apply --verbose --debug --trace --summarize test.pp where test.pp is the simplest form of your service as possible, and see if you get anything useful, although I

[Puppet Users] Re: Question regarding the SERVICE type

2010-09-30 Thread D.N. van der Meijden
Hi Luke, As mentioned it works manually: 'client:~# /etc/init.d/zabbix_agent start ; echo $? Starting Zabbix agent: zabbix_agentd 0 By the way, this specific client is a lenny 5.05 On 30 sep, 16:28, "luke.bigum" wrote: > As Nigel indicated, the exit code for your init script is not what > p

[Puppet Users] Re: Question regarding the SERVICE type

2010-09-30 Thread luke.bigum
As Nigel indicated, the exit code for your init script is not what puppet expects, it is not a file permission problem. As Nigel suggested, shut down your service then run this: /etc/init.d/zabbix_agent start ; echo $? And tell us what number is printed on the screen. If it prints 1, that would

[Puppet Users] Re: Question regarding the SERVICE type

2010-09-30 Thread D.N. van der Meijden
Thanks for the quick reply Nigel. I understand that the puppet is reporting back the exit status, but what I don't understand is why it keeps failing when trying to start via puppet. All files are available on the client, permissions are ok and starting the daemon manually works without problems.