Hi Rudy,
I'm not sure if you fixed this yet, but I ran into the same problem
using grep in an unless parameter of an exec resource.
I went looking through the Ruby code, in /usr/lib/ruby/site_ruby/1.8/
puppet/type/exec.rb on line 571. I changed these four lines:
unless FileTest.executable?(exe)
raise ArgumentError,
"'#{exe}' is not executable"
end
To just a single line like the one above:
raise ArgumentError, "'#{exe}' is not executable" unless
FileTest.executable?(exe)
And then Puppet stopped complaining. I thought this doesn't make any
sense at all, so I changed it back... Puppet still worked. I removed
and reinstalled the RPM, Puppet is back to complaining about grep not
being executable. I then just touched exec.rb and the problem is
magically fixed again.
I don't know very much about Ruby, so I'm just going to back away
very, very slowly, arms raised in the air to ward off evil ;)
But seriously, is there a Ruby guru who might know what's going on
here? I can even reproduce the issue by uninstalling and reinstalling
the puppet RPM - not sure how long it's going to stay broken though,
we'll see.
-Luke
On Dec 2, 10:30 am, Rudy Gevaert <[email protected]> wrote:
> Hi
>
> I'm seeing a strange thing here. I only have this on one machine! 3
> others that are 'identical' don't have that issue...
>
> err: /Stage[main]/Vim/Exec[update-alternatives --set editor /usr/bin/
> vim.basic]: Could not evaluate: 'test' is not executable
>
> class vim{
>
> $vim_package= "vim"
>
> package {
> $vim_package:
> ensure => installed,
> provider => $operatingsystem ? {
> "Solaris" => 'pkgutil',
> default => undef
> }
> }
>
> case $operatingsystem{
> "Debian": {
> exec { "update-alternatives --set editor /usr/bin/vim.basic":
> path => "/bin:/sbin:/usr/bin:/usr/sbin",
> unless => "test /etc/alternatives/editor -ef /usr/bin/
> vim.basic"
> }
> }
> }
>
> }
>
> Manual output:
>
> r...@cyrprd1:~# puppet agent --test
> info: Retrieving plugin
> info: Loading facts in ugentinfo
> info: Loading facts in configured_ntp_servers
> info: Loading facts in ugentinfo
> info: Loading facts in configured_ntp_servers
> info: Caching catalog for cyrprd1.ugent.be
> info: Applying configuration version '1291285388'
> notice: /Stage[main]/Debian_os/Exec[apt-get-update]/returns: executed
> successfully
> notice: /Stage[main]/Mailstore/Package[cyrus-ugent]/ensure: ensure
> changed '0.1-33' to '0.1-34'
> err: /Stage[main]/Vim/Exec[update-alternatives --set editor /usr/bin/
> vim.basic]: Could not evaluate: 'test' is not executable
> notice: Finished catalog run in 7.66 seconds
>
> r...@cyrprd1:~# test /etc/alternatives/editor -ef /usr/bin/vim.basic
> r...@cyrprd1:~# which test
> /usr/bin/test
> r...@cyrprd1:~# ls -l /usr/bin/test
> -rwxr-xr-x 1 root root 30136 Apr 28 2010 /usr/bin/test
> r...@cyrprd1:~#
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.