Hi,
First time install Chef Windows ( with the installer - http://www.opscode.com/chef/install.msi ). I created a recipes with " Chef::Log.info("Hello World") " and the windows node display this fine. Then I download the windows cookbook ( http://github.com/opscode-cookbooks/windows ) and test this
windows_batch "echo some env vars" do
code <<-EOH
echo %TEMP%
echo %SYSTEMDRIVE%
echo %PATH%
echo %WINDIR%
EOH
end
The windows node failed to run with this error:
[2012-08-20T11:26:28-07:00] INFO: Processing windows_batch[echo some env vars] action run (windows_base::default line /chef/cache/cookbooks/windows_base/recipes/default.rb)
[2012-08-20T11:26:28-07:00] ERROR: windows_batch[echo some env vars] (windows_base::default line /chef/cache/cookbooks/windows_base/recipes/default.rb) has had an error
[2012-08-20T11:26:28-07:00] ERROR: windows_batch[echo some env vars] (c:/chef/cache/cookbooks/windows_base/recipes/default.rb:27:in `from_file') had an error:
windows_batch[echo some env vars] (windows_base::default line /chef/cache/cookbooks/windows_base/recipes/default.rb) had an error: NameError: uninitialized constant Chef::Provider::Package::Macports
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/platform.rb:45:in `platforms'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/platform.rb:301:in `find'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/platform.rb:431:in `find_provider'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/platform.rb:364:in `find_provider_for_node'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/platform.rb:354:in `provider_for_resource'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource.rb:451:in `run_action'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.rb:49:in `run_action'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.rb:85:in `block (2 levels) in converge'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.rb:85:in `each'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.rb:85:in `block in converge'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection.rb:94:in `block in execute_each_resource'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection.rb:92:in `execute_each_resource'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.rb:80:in `converge'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/client.rb:330:in `converge'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/client.rb:163:in `run'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/application/windows_service.rb:96:in `service_main'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/application/windows_service.rb:237:in `mainloop'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/application/windows_service.rb:237:in `mainloop'
C:/Tools/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/application/windows_service.rb:237:in `<main>'
[2012-08-20T11:26:28-07:00] ERROR: Running exception handlers
[2012-08-20T11:26:28-07:00] FATAL: Saving node information to c:/chef/cache/failed-run-data.json
[2012-08-20T11:26:28-07:00] ERROR: Exception handlers complete
[2012-08-20T11:26:28-07:00] ERROR: NameError: windows_batch[echo some env vars] (windows_base::default line /chef/cache/cookbooks/windows_base/recipes/default.rb) had an error: NameError: uninitialized constant Chef::Provider::Package::Macports
why does it use MacPorts on Windows? or did the Chef windows installer missing something?
thanks
Archive powered by MHonArc 2.6.16.