Rudy Gevaert
2010-Dec-02 10:30 UTC
[Puppet Users] Could not evaluate: ''test'' is not executable
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: root@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 root@cyrprd1:~# test /etc/alternatives/editor -ef /usr/bin/vim.basic root@cyrprd1:~# which test /usr/bin/test root@cyrprd1:~# ls -l /usr/bin/test -rwxr-xr-x 1 root root 30136 Apr 28 2010 /usr/bin/test root@cyrprd1:~# -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
luke.bigum
2010-Dec-09 16:42 UTC
[Puppet Users] Re: Could not evaluate: ''test'' is not executable
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 <rudy.geva...@gmail.com> 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: > > root@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 > > root@cyrprd1:~# test /etc/alternatives/editor -ef /usr/bin/vim.basic > root@cyrprd1:~# which test > /usr/bin/test > root@cyrprd1:~# ls -l /usr/bin/test > -rwxr-xr-x 1 root root 30136 Apr 28 2010 /usr/bin/test > root@cyrprd1:~#-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
luke.bigum
2010-Dec-09 17:14 UTC
[Puppet Users] Re: Could not evaluate: ''test'' is not executable
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. On Dec 9, 4:42 pm, "luke.bigum" <luke.bi...@fasthosts.co.uk> wrote:> 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 <rudy.geva...@gmail.com> 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: > > > root@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 > > > root@cyrprd1:~# test /etc/alternatives/editor -ef /usr/bin/vim.basic > > root@cyrprd1:~# which test > > /usr/bin/test > > root@cyrprd1:~# ls -l /usr/bin/test > > -rwxr-xr-x 1 root root 30136 Apr 28 2010 /usr/bin/test > > root@cyrprd1:~# > >-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Patrick
2010-Dec-09 18:17 UTC
Re: [Puppet Users] Re: Could not evaluate: ''test'' is not executable
On Dec 9, 2010, at 9:14 AM, luke.bigum wrote:> 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.> On Dec 9, 4:42 pm, "luke.bigum" <luke.bi...@fasthosts.co.uk> wrote: >> 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 <rudy.geva...@gmail.com> 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: >> >>> root@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 >> >>> root@cyrprd1:~# test /etc/alternatives/editor -ef /usr/bin/vim.basic >>> root@cyrprd1:~# which test >>> /usr/bin/test >>> root@cyrprd1:~# ls -l /usr/bin/test >>> -rwxr-xr-x 1 root root 30136 Apr 28 2010 /usr/bin/test >>> root@cyrprd1:~# >> >> > > -- > 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+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
luke.bigum
2010-Dec-10 10:34 UTC
[Puppet Users] Re: Could not evaluate: ''test'' is not executable
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. I''ve raised a bug for this: http://projects.puppetlabs.com/issues/5495 On Dec 9, 6:17 pm, Patrick <kc7...@gmail.com> wrote:> On Dec 9, 2010, at 9:14 AM, luke.bigum wrote: > > > 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. > > > On Dec 9, 4:42 pm, "luke.bigum" <luke.bi...@fasthosts.co.uk> wrote: > >> 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 <rudy.geva...@gmail.com> 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: > > >>> root@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 > > >>> root@cyrprd1:~# test /etc/alternatives/editor -ef /usr/bin/vim.basic > >>> root@cyrprd1:~# which test > >>> /usr/bin/test > >>> root@cyrprd1:~# ls -l /usr/bin/test > >>> -rwxr-xr-x 1 root root 30136 Apr 28 2010 /usr/bin/test > >>> root@cyrprd1:~# > > > -- > > 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+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/puppet-users?hl=en. > >-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Patrick
2010-Dec-10 11:19 UTC
Re: [Puppet Users] Re: Could not evaluate: ''test'' is not executable
On Dec 10, 2010, at 2:34 AM, luke.bigum wrote:> 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.> I''ve raised a bug for this: http://projects.puppetlabs.com/issues/5495 > > On Dec 9, 6:17 pm, Patrick <kc7...@gmail.com> wrote: >> On Dec 9, 2010, at 9:14 AM, luke.bigum wrote: >> >>> 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. >> >>> On Dec 9, 4:42 pm, "luke.bigum" <luke.bi...@fasthosts.co.uk> wrote: >>>> 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 <rudy.geva...@gmail.com> 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: >> >>>>> root@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 >> >>>>> root@cyrprd1:~# test /etc/alternatives/editor -ef /usr/bin/vim.basic >>>>> root@cyrprd1:~# which test >>>>> /usr/bin/test >>>>> root@cyrprd1:~# ls -l /usr/bin/test >>>>> -rwxr-xr-x 1 root root 30136 Apr 28 2010 /usr/bin/test >>>>> root@cyrprd1:~# >> >>> -- >>> 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+unsubscribe@googlegroups.com. >>> For more options, visit this group athttp://groups.google.com/group/puppet-users?hl=en. >> >> > > -- > 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+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
luke.bigum
2010-Dec-10 11:40 UTC
[Puppet Users] Re: Could not evaluate: ''test'' is not executable
> > 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.I thought of that and put a script in ./grep to touch another file to see if it would be executed instead of the grep that is in the Exec resource''s path. It wasn''t so I assume it''s something to do with the Ruby FileTest module ''executable?'' method that''s not being done right, the actual command execution obeys the Exec''s path as expected. At least that''s what I observed for the bug report. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Patrick
2010-Dec-10 20:40 UTC
Re: [Puppet Users] Re: Could not evaluate: ''test'' is not executable
On Dec 10, 2010, at 3:40 AM, luke.bigum wrote:>>> 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. > > I thought of that and put a script in ./grep to touch another file to > see if it would be executed instead of the grep that is in the Exec > resource''s path. It wasn''t so I assume it''s something to do with the > Ruby FileTest module ''executable?'' method that''s not being done right, > the actual command execution obeys the Exec''s path as expected. At > least that''s what I observed for the bug report.Ah. Nevermind then. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Rudy Gevaert
2010-Dec-20 16:25 UTC
[Puppet Users] Re: Could not evaluate: ''test'' is not executable
On Friday, December 10, 2010 11:34:15 AM UTC+1, luke.bigum wrote:> > > file called ''grep''... Removing this stray file and puppet now runs > fine :) > >Hi Luke. Yes you are right! I had a file called test in /root ! thanks! -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.