Larry Fast
2013-Apr-12 19:23 UTC
[Puppet Users] Windows Puppet waits for <CR>, then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"
Windows NuBQ: I''m running windows with a clean install of puppet and an empty node definition. puppet agent -t pauses with no prompt. When I hit enter, I get this warning: Using Facter::Util::Resolution.exec with a shell built-in is deprecated. Most built-ins can be replaced with native ruby commands. If you really have to run a built-in, pass "cmd /c your_builtin" as a command How do I fix/disable this warning? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Paul Tötterman
2013-Apr-13 15:11 UTC
[Puppet Users] Re: Windows Puppet waits for <CR>, then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"
Hi, How do I fix/disable this warning?>It seems like you''ve added some extra facter facts? They seem to be implemented incorrectly. Remove the problematic one. Cheers, Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Josh Cooper
2013-Apr-14 18:43 UTC
Re: [Puppet Users] Windows Puppet waits for <CR>, then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"
On Saturday, April 13, 2013, Paul Tötterman wrote:> Hi, > > How do I fix/disable this warning? >> > > It seems like you''ve added some extra facter facts? They seem to be > implemented incorrectly. Remove the problematic one. > > Cheers, > Paul > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com <javascript:_e({}, > ''cvml'', ''puppet-users%2Bunsubscribe@googlegroups.com'');>. > To post to this group, send email to puppet-users@googlegroups.com<javascript:_e({}, ''cvml'', ''puppet-users@googlegroups.com'');> > . > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >It sounds like you have a custom fact executing ''date'' which on Windows will prompt waiting for user input. Josh -- Josh Cooper Developer, Puppet Labs *Join us at PuppetConf 2013, August 22-23 in San Francisco - * http://bit.ly/pupconf13* **The first 150 tickets sold will be available at a 35% discount - register now! Offer expires April 22.* -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Larry Fast
2013-Apr-17 05:46 UTC
Re: [Puppet Users] Windows Puppet waits for <CR>, then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"
I think I found the problem. Pluginsync seems to load ALL plugins - even for modules that are not included in that node''s manifest. Is this correct? I think my problem is a plugin that runs fine in Unix but does not work properly in windows. Side issue: diagnostics could have been better. The error did not indicate a source file. And Pluginsync does not indicate the source module for any of the files it loads. Not even in debug mode. Cheers, Larry Fast> > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Felix Frank
2013-Apr-17 07:54 UTC
Re: [Puppet Users] Windows Puppet waits for <CR>, then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"
On 04/17/2013 07:46 AM, Larry Fast wrote:> I think I found the problem. Pluginsync seems to load ALL plugins - > even for modules that are not included in that node''s manifest. Is this > correct?Yes. Pluginsync happens before the manifest is even compiled. This is a logical necessity. E.g. your custom facts might affect conditional in the manifest and even alter the set of modules included. It is therefor necessary to restrict all facts to valid platforms.> And Pluginsync does not indicate the source module for any of > the files it loads.Hmm, that may well be the case. The easiest workaround is probably to trawl your modules/*/lib directories for the .rb file in question. The basename should be visible in the agent output. Cheers, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Larry Fast
2013-Apr-17 16:31 UTC
Re: [Puppet Users] Windows Puppet waits for <CR>, then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"
Solution: Find the .rb files that contained Facter::Util::Resolution.exec and ... Facter.add("my_function") do confine :kernel => [ ''Linux'' , ''SunOS'' , ''FreeBSD'' , ''Darwin'' ] ... Thanks everyone! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Dirk Heinrichs
2013-Apr-19 11:50 UTC
Re: [Puppet Users] Windows Puppet waits for <CR>, then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"
On Fri, Apr 12, 2013 at 12:23:45PM -0700, Larry Fast wrote:> Windows NuBQ: > I''m running windows with a clean install of puppet and an empty node > definition. puppet agent -t pauses with no prompt. When I hit enter, I > get this warning: > > Using Facter::Util::Resolution.exec with a shell built-in is deprecated. > Most built-ins can be replaced with native ruby commands. If you really > have to run a built-in, pass "cmd /c your_builtin" as a command > > How do I fix/disable this warning?I''m facing a similar problem, on one single Windows machine out of more than 100. If I run any puppet command, I get above warning. Additionally, it can''t execute the following simple class to update the puppet.conf file: class puppetconf { service { ''PuppetAgent'': name => ''puppet'', ensure => ''running'', enable => ''true'', subscribe => File[''puppet.conf''], } file { ''puppet.conf'': path => ''C:/ProgramData/PuppetLabs/puppet/etc/puppet.conf'', ensure => file, source => ''puppet:///modules/puppetconf/puppet.conf'', } } It fails with the following error: Error: /Service[PuppetAgent]: Could not evaluate: Could not find init script for ''puppet'' It looks like it somehow thinks it isn''t running on a Windows machine. I''ve read this thread but the solution given here doesn''t apply to my setup. There are no custom facts added, and the few modules installed from PuppetForge work fine on all the other machines. Anything else I could do to resolve this issue? Thanks... Dirk -- Dirk Heinrichs <dirk.heinrichs@altum.de> Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913 GPG Public Key C2E467BB | Jabber: dirk.heinrichs@altum.de
Stefan Schulte
2013-Apr-20 11:55 UTC
Re: [Puppet Users] Windows Puppet waits for <CR>, then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"
On Fri, 19 Apr 2013 13:50:59 +0200 Dirk Heinrichs <dirk.heinrichs@altum.de> wrote:> I''m facing a similar problem, on one single Windows machine out of > more than 100. If I run any puppet command, I get above warning.We''ll first try to get a clearer error message. Please go to your facter installation directory on your agent and modify the file `util/resolution.rb`. Change Facter.warnonce ''Using Facter::Util::Resolution.exec with a shell built-in is deprecated. Most built-ins can be replaced with native ruby commands. If you really have to run a built-in, pass "cmd /c your_builtin" as a command'' unless expanded_code to Facter.warnonce "Using Facter::Util::Resolution.exec with a shell built-in (here: #{code}) is deprecated. Most built-ins can be replaced with native ruby commands. If you really have to run a built-in, pass \"cmd /c your_builtin\" as a command" unless expanded_code Then run your agent again. This way you should see the command that puppet complains about.> Additionally, it can''t execute the following simple class to update > the puppet.conf file: > > class puppetconf { > service { ''PuppetAgent'': > name => ''puppet'', > ensure => ''running'', > enable => ''true'', > subscribe => File[''puppet.conf''], > } > > file { ''puppet.conf'': > path => ''C:/ProgramData/PuppetLabs/puppet/etc/puppet.conf'', > ensure => file, > source => ''puppet:///modules/puppetconf/puppet.conf'', > } > } > > It fails with the following error: > > Error: /Service[PuppetAgent]: Could not evaluate: Could not find init > script for ''puppet''Can you provide the output of your agent when you run with `--debug`? This way we should be able to see the actual provider the agent picks for the service resource. Also the output of the following command would be helpful facter operatingsystem the above command should return "windows" net.exe the above command should be found. If not please check your path (try running `facter path`) -Stefan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Stefan Schulte
2013-Apr-20 12:16 UTC
Re: [Puppet Users] Windows Puppet waits for <CR>, then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"
On Tue, 16 Apr 2013 22:46:53 -0700 (PDT) Larry Fast <lfast1234@gmail.com> wrote:> > Side issue: diagnostics could have been better. The error did not > indicate a source file. And Pluginsync does not indicate the source > module for any of the files it loads. Not even in debug mode. >FYI: I created a feature request for a better deprecation message: http://projects.puppetlabs.com/issues/20321 -Stefan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Dirk Heinrichs
2013-Apr-22 06:58 UTC
Re: [Puppet Users] Windows Puppet waits for <CR>, then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"
On Sat, Apr 20, 2013 at 01:55:46PM +0200, Stefan Schulte wrote:> We''ll first try to get a clearer error message. Please go to your facter > installation directory on your agent and modify the file > `util/resolution.rb`. Change > > Facter.warnonce ''Using Facter::Util::Resolution.exec with a shell built-in is deprecated. Most built-ins can be replaced with native ruby commands. If you really have to run a built-in, pass "cmd /c your_builtin" as a command'' unless expanded_code > > to > > Facter.warnonce "Using Facter::Util::Resolution.exec with a shell built-in (here: #{code}) is deprecated. Most built-ins can be replaced with native ruby commands. If you really have to run a built-in, pass \"cmd /c your_builtin\" as a command" unless expanded_code > > Then run your agent again. This way you should see the command that > puppet complains about.It''s actually three commands: C:\Program Files (x86)\Puppet Labs\Puppet\bin>puppet agent -t Using Facter::Util::Resolution.exec with a shell built-in (here: hostname) is deprecated. Most built-ins can be replaced with native ruby commands. If you really have to run a built-in, pass "cmd /c your_builtin" as a command Info: Retrieving plugin Using Facter::Util::Resolution.exec with a shell built-in (here: arp -a) is deprecated. Most built-ins can be replaced with native ruby commands. If you really have to run a built-in, pass "cmd /c your_builtin" as a command Info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/facter_dot_d.rb Info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/pe_version.rb Info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/puppet_vardir.rb Info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/root_home.rb Using Facter::Util::Resolution.exec with a shell built-in (here: whoami) is deprecated. Most built-ins can be replaced with native ruby commands. If you really have to run a built-in, pass "cmd /c your_builtin" as a command Info: Caching catalog for XXXXXXXXXXXX Info: Applying configuration version ''1366367977'' Error: /Service[PuppetAgent]: Could not evaluate: Could not find init script for ''puppet'' Notice: Finished catalog run in 0.43 seconds> > Error: /Service[PuppetAgent]: Could not evaluate: Could not find init > > script for ''puppet'' > > Can you provide the output of your agent when you run with `--debug`? > This way we should be able to see the actual provider the agent picks > for the service resource.See attachment.> Also the output of the following command would be helpful > > facter operatingsystem > > the above command should return "windows"Prints: windows> net.exe > > the above command should be found. If not please check your path > (try running `facter path`)Ah, it''s not found. But the path looks good to me (I''m not a Windows expert, though): C:\Program Files (x86)\Puppet Labs\Puppet\bin>facter path C:\Program Files (x86)\Puppet Labs\Puppet\puppet\bin;C:\Program Files (x86)\Puppet Labs\Puppet\facter\bin;C:\Program Files (x86)\Puppet Labs\Puppet\hiera\bin;C:\Program Files (x86)\Puppet Labs\Puppet\bin;C:\Program Files (x86)\Puppet Labs\Puppet\sys\ruby\bin;C:\Program Files (x86)\Puppet Labs\Puppet\sys\tools\bin;C:\Program Files (x86)\Puppet Labs\Puppet\puppet\bin;C:\Program Files (x86)\Puppet Labs\Puppet\facter\bin;C:\Program Files (x86)\Puppet Labs\Puppet\hiera\bin;C:\Program Files (x86)\Puppet Labs\Puppet\bin;C:\Program Files (x86)\Puppet Labs\Puppet\sys\ruby\bin;C:\Program Files (x86)\Puppet Labs\Puppet\sys\tools\bin;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;%SystemRoot%\System32\Wbem;%SystemRoot%\system32;D:\Recommind\program\bin64;D:\Recommind\program\bin32\minicygwin;D:\Recommind\program\bin32;D:\Recommind\program\bat\system;D:\Recommind\program\bat;D:\Recommind\jdk\bin;D:\Recommind\jdk32\bin;D:\Recommind\JRuby\bin;D:\Recommind\Downloads\bat;%PATH% Bye... Dirk -- Dirk Heinrichs <dirk.heinrichs@altum.de> Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913 GPG Public Key C2E467BB | Jabber: dirk.heinrichs@altum.de
Dirk Heinrichs
2013-Apr-22 07:32 UTC
Re: [Puppet Users] Windows Puppet waits for <CR>, then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"
On Mon, Apr 22, 2013 at 08:58:31AM +0200, Dirk Heinrichs wrote:> C:\Program Files (x86)\Puppet Labs\Puppet\bin>facter path > C:\Program Files (x86)\Puppet Labs\Puppet\puppet\bin;C:\Program Files (x86)\Puppet Labs\Puppet\facter\bin;C:\Program Files (x86)\Puppet Labs\Puppet\hiera\bin;C:\Program Files (x86)\Puppet Labs\Puppet\bin;C:\Program Files (x86)\Puppet Labs\Puppet\sys\ruby\bin;C:\Program Files (x86)\Puppet Labs\Puppet\sys\tools\bin;C:\Program Files (x86)\Puppet Labs\Puppet\puppet\bin;C:\Program Files (x86)\Puppet Labs\Puppet\facter\bin;C:\Program Files (x86)\Puppet Labs\Puppet\hiera\bin;C:\Program Files (x86)\Puppet Labs\Puppet\bin;C:\Program Files (x86)\Puppet Labs\Puppet\sys\ruby\bin;C:\Program Files (x86)\Puppet Labs\Puppet\sys\tools\bin;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;%SystemRoot%\System32\Wbem;%SystemRoot%\system32;D:\Recommind\program\bin64;D:\Recommind\program\bin32\minicygwin;D:\Recommind\program\bin32;D:\Recommind\program\bat\system;D:\Recommind\program\bat;D:\Recommind\jdk\bin;D:\Recommind\jdk32\bin;D:\Recommind\JRuby\bin;D:\Recommind\Downloads\bat;%PATH%Found it: The two occurrences of %SystemRoot% should really be %SYSTEMROOT%. Fixed it, works now. Bye... Dirk -- Dirk Heinrichs <dirk.heinrichs@altum.de> Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913 GPG Public Key C2E467BB | Jabber: dirk.heinrichs@altum.de
Paul Tötterman
2013-Apr-22 07:45 UTC
Re: [Puppet Users] Windows Puppet waits for <CR>, then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"
> > Found it: The two occurrences of %SystemRoot% should really be%SYSTEMROOT%. Fixed it, works now.>Shouldn''t environment variables be case-insensitive? What code is responsible for expanding those environment variables? Cheers, Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Dirk Heinrichs
2013-Apr-22 08:08 UTC
Re: [Puppet Users] Windows Puppet waits for <CR>, then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"
On Mon, Apr 22, 2013 at 12:45:35AM -0700, Paul Tötterman wrote:> Shouldn''t environment variables be case-insensitive? What code is > responsible for expanding those environment variables?This is Windows, so I''d say: "It depends". I can do this: C:\Program Files (x86)\Puppet Labs\Puppet\bin>echo %SYSTEMROOT% C:\Windows C:\Program Files (x86)\Puppet Labs\Puppet\bin>echo %SYSTEMRoot% C:\Windows But, as seen, expanding %SYSTEMROOT% in %PATH% only seems to work when it''s all uppercase... And I still hear people whining how complicated this Linux thing is... Bye... Dirk -- Dirk Heinrichs <dirk.heinrichs@altum.de> Tel: +49 (0)2471 209385 | Mobil: +49 (0)176 34473913 GPG Public Key C2E467BB | Jabber: dirk.heinrichs@altum.de
Stefan Schulte
2013-Apr-22 18:39 UTC
Re: [Puppet Users] Windows Puppet waits for <CR>, then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"
On Mon, 22 Apr 2013 10:08:45 +0200 Dirk Heinrichs <dirk.heinrichs@altum.de> wrote:> On Mon, Apr 22, 2013 at 12:45:35AM -0700, Paul Tötterman wrote: > > > Shouldn''t environment variables be case-insensitive? What code is > > responsible for expanding those environment variables? > > This is Windows, so I''d say: "It depends". I can do this: > > C:\Program Files (x86)\Puppet Labs\Puppet\bin>echo %SYSTEMROOT% > C:\Windows > > C:\Program Files (x86)\Puppet Labs\Puppet\bin>echo %SYSTEMRoot% > C:\Windows > > But, as seen, expanding %SYSTEMROOT% in %PATH% only seems to work when > it''s all uppercase... >Maybe this does not apply to your case but I once saw a crappy application that changed the type of the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment to REG_SZ (instead of REG_EXPAND_SZ). This way other environment variables inside PATH (like %SYSTEMROOT%) were not expanded anymore and it took me ages to discover that one ;-) -Stefan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.