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=debian): Executing '/etc/init.d/
zabbix_agent status'
debug: Puppet::Type::Service::ProviderDebian: Executing '/usr/sbin/
update-rc.d -n -f zabbix_agent remove'
debug: //Service[zabbix_agent]: Changing ensure
debug: //Service[zabbix_agent]: 1 change(s)
debug: Service[zabbix_agent](provider=debian): Executing '/etc/init.d/
zabbix_agent start'
err: //Service[zabbix_agent]/ensure: change from stopped to running
failed: Could not start Service[zabbix_agent]: Execution of '/etc/
init.d/zabbix_agent start' returned 1:  at /tmp/jadda.pp:6
debug: Finishing transaction 70189522224900 with 1 changes

client:/tmp# cat jadda.pp
   service { "zabbix_agent":
      name      => "zabbix_agent",
      enable    => true,
      ensure    => running,
      hasstatus => true,
   }


On 5 okt, 13:11, "D.N. van der Meijden" <cybernijn...@gmail.com>
wrote:
> 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 workaround I can reboot the client (since the daemon does start
> after a reboot because of the rc2.d symlink created by the mantifest
> file), but this is not really an option...
>
> The only thing I can think of right now is that the zabbix_agent
> daemon needs to run as userzabbix, and puppet can't get it to run
> that way (I know really far fetched, but I'm getting out of options
> here..)
>
> On 30 sep, 18:26, Nan Liu <n...@puppetlabs.com> wrote:
>
>
>
> > On Thu, Sep 30, 2010 at 8:46 AM, D.N. van der Meijden
>
> > <cybernijn...@gmail.com> wrote:
> > > Here's the init script:
>
> > > (by the way, I changed the service to rsyslog [in thezabbixmanifest
> > > 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_agentd
> > > NAME=zabbix_agentd
> > > DESC="Zabbixagent"
> > > PID=/var/tmp/$NAME.pid
>
> > > test -f $DAEMON || exit 0
> > > set -e
> > > case "$1" in
> > >  start)
> > >        echo "Starting $DESC: $NAME"
> > >        start-stop-daemon --oknodo --start --pidfile $PID \
> > >                --exec $DAEMON
> > >        ;;
> > >  stop)
> > >        echo "Stopping $DESC: $NAME"
> > >        start-stop-daemon --oknodo --stop  --pidfile $PID \
> > >                --exec $DAEMON
> > >        ;;
> > >  restart|force-reload)
> > >        $0 stop
> > >        $0 start
> > >        ;;
> > >  *)
> > >        N=/etc/init.d/$NAME
> > >        echo "Usage: $N {start|stop|restart|force-reload}" >&2
> > >        exit 1
> > >        ;;
> > > esac
> > > exit 0
>
> > The script does not provide status, so when hasstatus is set to true,
> > puppet is querying service state via an invalid command:
> > /etc/init.d/zabbixstatus
>
> > This will always fail, which makes puppet think the service is always 
> > stopped.
>
> > I would look at:http://www.nowvox.com/contrib/zabbix/zabbix_agentd
>
> > Thanks,
>
> > Nan- Tekst uit oorspronkelijk bericht niet weergeven -
>
> > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit oorspronkelijk 
> > bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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