Reputation: 6370
I'm trying to override https://github.com/elasticsearch/cookbook-elasticsearch/blob/master/attributes/default.rb#L51 with a block like http://pastie.org/private/rfrpsjvl2ldxjky91r6zqg using Chef Solo.
# filename: chef/roles/elasticsearch.rb
name "elasticsearch"
description "Args"
run_list ['recipe[java]', 'recipe[elasticsearch]']
override_attributes { "node" => { "elasticsearch" => { "bootstrap" => { "mlockall" => false } } } }
# Also tried:
# override_attributes { "elasticsearch" => { "bootstrap" => { "mlockall" => false } } }
It seems like this may have been a bug in my chef version(11.4.4
, issue at Google Cache, because of the opscodepocalypse)
It appears to be some issue with recently introduced changed to requiring additional metadata, but I can't find any reference to that.
Without defining a wrapper cookbook, how can I override these attributes?
Bonus if anyone can tell me how I could debug this myself with Chef-solo?
Upvotes: 1
Views: 2843
Reputation: 6370
I wasn't able to make this work at all, I resorted to writing the following in my site-cookbooks/base/attributes/default.rb
:
override.elasticsearch[:bootstrap][:mlockall] = false
It appears that the Chef 11 attribute resolution precedences changed quite a lot: http://www.opscode.com/blog/2013/02/05/chef-11-in-depth-attributes-changes/.
Upvotes: 1
Reputation: 4230
I would try
override_attributes :elasticsearch => { :bootstrap => { :mlockall => false } }
Upvotes: 0