> Interesting, I've noticed that puppet runs triggered from a daemonised
> puppetd aren't affected by the problem (as Dashboard and /var/log/
> messages says their is no errors), but when run from the command line
> as puppetd --test it fails as usual for me:
>
> err: /Stage[main]/Fh_freetds/Exec[change /etc/freetds.conf version]:
> Could not evaluate: 'grep' is not executable
>
> Can't spot any difference in the environments so far.
Here's something to try, can you reproduce this problem using the local "puppet" program that directly evaluates the manifest. Not the client "puppetd". If so, that's a lot less code you've narrowed to down to.
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>
> Thanks for the suggestion Patrick, it led me to the cause of the
> problem :)
>
> I wrote a very simple local test manifest to emulate the Exec problem
> with 'puppet apply' and it still occurred. Out of pure habit, I often
> execute 'ls -l' when I switch between terminals (so I know where I am)
> and noticed that in /root on the server in question there was an empty
> file called 'grep'... Removing this stray file and puppet now runs
> fine :)
>
> It seems that something to do with Ruby's FileTest module is
> searching ./ before the specified Path in the exec resource, thus
> finding a non executable 'grep' in CWD and complaining that it's not
> executable. The touching of exec.rb was a red herring as I was
> changing into the Ruby lib directory before hand :)
>
> This doesn't appear to affect the actual execution of commands, so
> don't be worried about the wrong commands being executed based on the
> CWD of Puppet.
Except it might be. Puppet might have been trying to execute the file and then failing because the permissions were 644 instead of 755.
Ah. Nevermind then.
file called 'grep'... Removing this stray file and puppet now runs
fine :)