- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: Re: Re: 0.7.14 -> 0.7.16... issues
- Date: Tue, 9 Feb 2010 10:09:29 -0800
This is perplexing: I can't find anywhere that variable or method
"master" is used in Chef. From your stack trace it looks like you were
calling the method "master" on the template resource somehow (as an
aside, resources now implement the recipe DSL to support LWRP and the
deploy resource's embedded recipe callbacks, but this first appeared
in 0.7.12, nothing new in 0.7.16). Is it possible that you changed
something else at the same time you upgraded?
Dan DeLeo
On Tue, Feb 9, 2010 at 9:09 AM, Bill Levering
<
>
wrote:
>
Interesting...
>
>
in recipe.rb I had:
>
template "/etc/snmp/snmpd.conf" do
>
backup 0
>
mode 0444
>
owner "root"
>
group "root"
>
path "/etc/snmp/snmpd.conf"
>
variables(
>
:community => node[:community][:string],
>
:mrtgserver => "172.16.11.201/32",
>
:opennmsserver => "172.16.11.235/32",
>
:extradisk => node[:community][:disk],
>
:snmp-master => node[:community][:master],
>
:hostname => node[:hostname]
>
)
>
source "snmp.conf.erb"
>
action :create
>
end
>
>
template snmp.conf.erb had:
>
<%= @snmp-master %>
>
>
and attributes/community_strings.rb had:
>
community Mash.new unless attribute?("community")
>
>
case hostname
>
>
when "watchmen"
>
community[:string] = "*******"
>
community[:disk] = ""
>
community[:master] = ""
>
>
>
I changed all instances of master to snmpmaster
>
and snmp-master to snmpmaster
>
>
at it works in 0.7.16
>
>
Would this be a reserved variable?
>
>
Bill
>
>
>
Bill Levering
>
>
KFP: 0C38 4D7E 5B50 94FE 992D 406D 6C81 DE33 5459 A1AC
>
>
>
>
>
On Feb 8, 2010, at 11:21 PM, Daniel DeLeo wrote:
>
>
> Hi Bill,
>
> seems like it's a problem in that snmp cookbook. Can you show us the
>
> default.rb recipe?
>
>
>
> Thanks,
>
> Dan DeLeo
>
>
>
> On Mon, Feb 8, 2010 at 6:32 PM, Bill Levering
>
> <
>
>
> wrote:
>
>>
>
>> My client Machines that have been updated to:
>
>>
>
>> 0.7.16
>
>>
>
>> are displaying:
>
>>
>
>> /usr/lib/ruby/gems/1.8/gems/chef-0.7.16/lib/chef/resource.rb:72:in
>
>> `method_missing': undefined method `master' for Chef::Resource::Template
>
>> (NoMethodError)
>
>> from /usr/local/chef/cache/cookbooks/snmp/recipes/default.rb:47:in
>
>> `from_file'
>
>> from
>
>>
>
>> /usr/lib/ruby/gems/1.8/gems/chef-0.7.16/lib/chef/mixin/recipe_definition_dsl_core.rb:68:in
>
>> `instance_eval'
>
>> from
>
>>
>
>> /usr/lib/ruby/gems/1.8/gems/chef-0.7.16/lib/chef/mixin/recipe_definition_dsl_core.rb:68:in
>
>> `method_missing'
>
>> from /usr/local/chef/cache/cookbooks/snmp/recipes/default.rb:37:in
>
>> `from_file'
>
>> from
>
>> /usr/lib/ruby/gems/1.8/gems/chef-0.7.16/lib/chef/cookbook.rb:166:in
>
>> `load_recipe'
>
>> from
>
>> /usr/lib/ruby/gems/1.8/gems/chef-0.7.16/lib/chef/compile.rb:156:in
>
>> `load_recipes'
>
>> from
>
>> /usr/lib/ruby/gems/1.8/gems/chef-0.7.16/lib/chef/compile.rb:142:in `each'
>
>> from
>
>> /usr/lib/ruby/gems/1.8/gems/chef-0.7.16/lib/chef/compile.rb:142:in
>
>> `load_recipes'
>
>> ... 7 levels...
>
>> from
>
>> /usr/lib/ruby/gems/1.8/gems/chef-0.7.16/lib/chef/application.rb:57:in
>
>> `run'
>
>> from /usr/lib/ruby/gems/1.8/gems/chef-0.7.16/bin/chef-client:26
>
>> from /usr/bin/chef-client:19:in `load'
>
>> from /usr/bin/chef-client:19
>
>>
>
>> What needs to be fixed?
>
>>
>
>>
>
>> Bill Levering
>
>>
>
>> KFP: 0C38 4D7E 5B50 94FE 992D 406D 6C81 DE33 5459 A1AC
>
>>
>
>>
>
>>
>
>>
>
>>
>
>
Archive powered by MHonArc 2.6.16.