ZCA / zenoss-chef-cookbook

Chef Cookbook for Installing and Managing Zenoss
Apache License 2.0
8 stars 6 forks source link

Mysql recipe fails on rhel platforms when using Chef 10. #14

Closed sfiggins closed 11 years ago

sfiggins commented 11 years ago

This is actually an error in chef, but one that effects this cookbook. The yum package resource is missing a mixin for shellout when a "source" is specified. This was fixed in Chef 11, but hasn't been backported to 10 yet.

opscode ticket CHEF-4380

My stacktrace:
NameError: yum_package[MySQL-client] (zenoss::mysql55 line 55) had an error: NameError: Cannot find a resource for shell_out! on centos version 6.3
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/resource_platform_map.rb:126:in `get'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/resource.rb:876:in `resource_for_platform'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/resource.rb:893:in `resource_for_node'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/mixin/recipe_definition_dsl_core.rb:58:in `method_missing'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/provider/package/yum.rb:1073:in `load_current_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/provider.rb:98:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/resource.rb:627:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/runner.rb:49:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/runner.rb:57:in `block in run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/runner.rb:55:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/runner.rb:55:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/runner.rb:81:in `block (2 levels) in converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/runner.rb:81:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/runner.rb:81:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/resource_collection.rb:94:in `block in execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/resource_collection.rb:92:in `execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/runner.rb:80:in `converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/client.rb:378:in `converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/client.rb:420:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/client.rb:176:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/application.rb:133:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/application/solo.rb:224:in `block in run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/application/solo.rb:216:in `loop'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/application/solo.rb:216:in `run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/lib/chef/application.rb:65:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.28.0/bin/chef-solo:25:in `<top (required)>'
/usr/bin/chef-solo:23:in `load'
/usr/bin/chef-solo:23:in `<main>'
dpetzel commented 11 years ago

Hey @sfiggins, thanks for reporting this. I've done some testing and I don't believe this is an issue with this cookbook, but rather a bug in Chef. Recent notes in the ticket you reference also support that. I commented on that issue, and I believe you should be able to avoid this error by sticking with Chef 10.26.0 for now.

I'm going to go ahead and close this out in favor of the official Opscode ticket.

sfiggins commented 11 years ago

Unfortunately 10.26.0 has bad memory leaks when run in daemon mode and using LWRPs and data bags, which is why I use 10.28. The chef ticket is the right answer, I mostly wanted to log the problem here for others that might run into it and in case you wanted to add a note about the problem in the README for that recipe.

dpetzel commented 11 years ago

That's a good suggestion, I'll add a note to the README.