On Mar 17, 2009, at 3:47 AM, Arnau Bria wrote:

>
> Hi all,
>
> I moved my clients' daemon to a cron using:
> http://reductivelabs.com/trac/puppet/wiki/Recipes/cron
>
> My first attempt:
> # /usr/bin/ruby /usr/sbin/puppetd --server=gridinstall.pic.es --test
> err: Could not retrieve catalog: Failed to execute generator /usr/ 
> bin/env: Execution of '/usr/bin/env /usr/local/sbin/randomnum  
> td006.pic.es 60' returned 127: /usr/bin/env: /usr/local/sbin/ 
> randomnum: No such file or directory
> at /etc/puppet/manifests/modules/local_conf/manifests/init.pp:71 on  
> node td006.pic.es
>
> but:
> # ls -lsa /usr/local/sbin/randomnum
> 4 -rwxr-xr-x  1 root root 679 Mar 16 12:48 /usr/local/sbin/randomnum
>
> I removed /usr/bin/env and now I get:
>
> err: Could not retrieve catalog: Failed to execute generator /usr/ 
> local/sbin/randomnum: Execution of '/usr/local/sbin/randomnum  
> td006.pic.es 60' returned 1:  at /etc/puppet/manifests/modules/ 
> local_conf/manifests/init.pp:72 on node td006.pic.es
>
> but if I run it by hand:
>
> # /usr/local/sbin/randomnum td006.pic.es 60
> 58[r...@td006 ~]# echo $?
> 0
>
>
> Here I paste code:
> $timeoffset1 = generate('/usr/local/sbin/randomnum', "$fqdn", "60")
>
>        cron { "puppet":
>                ensure  => present,
>                command => "/usr/sbin/puppetd --onetime --no- 
> daemonize --logdest /var/log/puppet/puppet.log --server  
> gridinstall.pic.es > /dev/null 2>&1",
>                user    => 'root',
>                minute  => [$timeoffset1],
>        }
>
>
> Could someone explainme why randomnum is returning 1 when it runs
> insiede puppet?

Is randomnum on your client or server?

It needs to be on your server.

-- 
A complex system that works is invariably found to have evolved from a
simple system that works. -- John Gaule
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


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