popularity question answers views user  
1
Contributing changes to cookbooks back to the community

I’ve been working with a local chef server in a manner similar to how the “Getting Started” tutorial sets you up: forking the chef-repo repository, using ‘knife cookbook site vendor’ to download cookbooks and ‘knife cookbook upload’ to upload them to the chef server.

I’m making changes to some of the downloaded cookbooks and keeping them in my chef-repo fork. I would like to push some of these changes back to the community, as they are general-purpose enhancements and seem like they’d be useful to a broader audience. What is the best way to do that?

more →
1 914  
0
problems with package provider and remote sources

I have a very simple recipe that tries to install a (yum) package from a remote repo, as follows:

package "passenger-release" do
  source node["passenger-rpm"]["releaserpm"]
  action :install
end

I’ve checked that on the target node, node[“passenger-rpm”][“releaserpm”] is defined properly, i.e. “http://passenger.stealthymonkeys.com/fedora/16/passenger-release.noarch.rpm”

When I try to run this, chef-client spits out a very bizarre error:

[Mon, 26 Mar 2012 23:41:42 -0400] INFO: Processing package[passenger-release] action install (passenger-rpm::default line 25)
[Mon, 26 Mar 2012 23:44:55 -0400] WARN: Problem parsing line 'samba4-pidl 0 4.0.0 37.alpha16.fc16 x86_64 ['perl(Parse::Pidl) = 0.02', 'perl(Parse::Pidl::CUtil) = 0.01', 'perl(Parse::Pidl::Compat) = 0.01', 'perl(Parse::Pidl::Dump) = 0.01', 'perl(Parse::Pidl::Expr)', 'perl(Parse::Pidl::IDL)', 'perl(Parse::Pidl::NDR) = 0.01', 'perl(Parse::Pidl::ODL) = 0.01', 'perl(Parse::Pidl::Samba3::ClientNDR) = 0.01', 'perl(Parse::Pidl::Samba3::ServerNDR) = 0.01', 'perl(Parse::Pidl::Samba4) = 0.01', 'perl(Parse::Pidl::Samba4::COM::Header) = 0.01', 'perl(Parse::Pidl::Samba4::COM::Proxy) = 0.01', 'perl(Parse::Pidl::Samba4::COM::Stub) = 0.01', 'perl(Parse::Pidl::Samba4::Header) = 0.01', 'perl(Parse::Pidl::Samba4::NDR::Client) = 0.01', 'perl(Parse::Pidl::Samba4::NDR::Parser) = 0.01', 'perl(Parse::Pidl::Samba4::NDR::Server) = 0.01', 'perl(Parse::Pidl::Samba4::Python) = 0.01', 'perl(Parse::Pidl::Samba' from yum-dump.py! Please check your yum configuration.
[Mon, 26 Mar 2012 23:44:55 -0400] ERROR: package[passenger-release] (passenger-rpm::default line 25) has had an error
[Mon, 26 Mar 2012 23:44:55 -0400] ERROR: package[passenger-release] (/var/chef/cache/cookbooks/passenger-rpm/recipes/default.rb:25:in `from_file') had an error:
package[passenger-release] (passenger-rpm::default line 25) had an error: Chef::Exceptions::Package: Yum failed - #<Process::Status: pid=7089,signaled(SIGKILL=9)> - returns: 
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/provider/package/yum.rb:751:in `refresh'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/provider/package/yum.rb:810:in `packages_from_require'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/provider/package/yum.rb:1144:in `parse_dependency'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/provider/package/yum.rb:975:in `load_current_resource'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource.rb:439:in `run_action'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/runner.rb:45:in `run_action'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/runner.rb:81:in `converge'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/runner.rb:81:in `each'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/runner.rb:81:in `converge'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource_collection.rb:94:in `execute_each_resource'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource_collection.rb:92:in `execute_each_resource'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/runner.rb:76:in `converge'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:312:in `converge'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:160:in `run'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:239:in `run_application'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:229:in `loop'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:229:in `run_application'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application.rb:67:in `run'
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/chef-client:26
/usr/bin/chef-client:19:in `load'
/usr/bin/chef-client:19

Any ideas?

more →
1 321  
0
Can't unzip cookbooks on Windows Command Line - 'tar' not recognized

Chef newbie

When I try

knife cookbook site install COOKBOOK  

I get an error. The file does not unzip and I am left with a .tar.gz file ONLY. Any ideas?

The error message:

STDERR: 'tar' is not recognized as an internal or external command, operable program or batch file.

Thanks in advance.

more →
0 124  
0
Unable to upload cookbook the second time

I am running chef from a grid cloud image. Everything works fine the first time I try to upload a cookbook, recipes and then run chef-client. But if I edit some recipe and then try to upload the cookbook again I get the following error:

Uploading graphite                       [1.0.5]
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001c7a398> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121009-2118-s36xlp.lock"]}
ERROR: RestClient::InternalServerError: 500 Internal Server Error
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001c7a398> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121009-2118-tzcuve.lock"]}root@chef-server:/root

Not able to figure this out.

more →
0 122