[chef] Re: Re: Re: Re: 0.7.14 -> 0.7.16... issues


Chronological Thread 
  • From: Bill Levering < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: 0.7.14 -> 0.7.16... issues
  • Date: Tue, 9 Feb 2010 10:19:40 -0800

Could it be bad interpretation of snmp-master (the dash causing the problem)?

Many things were updated....
Jan 28 10:42:00 Updated: libgcc-4.1.2-46.el5_4.2.x86_64
Jan 28 10:42:03 Updated: rubygem-chef-server-slice-0.7.16-1.el5.noarch
Jan 28 10:42:10 Updated: tzdata-2009u-1.el5.noarch
Jan 28 10:43:01 Updated: glibc-common-2.5-42.el5_4.3.x86_64
Jan 28 10:43:14 Updated: glibc-2.5-42.el5_4.3.x86_64
Jan 28 10:43:20 Updated: util-linux-2.13-0.52.el5_4.1.x86_64
Jan 28 10:43:21 Updated: kpartx-0.4.7-30.el5_4.4.x86_64
Jan 28 10:43:24 Updated: selinux-policy-2.4.6-255.el5_4.4.noarch
Jan 28 10:43:26 Updated: device-mapper-multipath-0.4.7-30.el5_4.4.x86_64
Jan 28 10:43:27 Updated: gzip-1.3.5-11.el5.centos.1.x86_64
Jan 28 10:43:30 Updated: ksh-20080202-14.el5_4.2.x86_64
Jan 28 10:43:31 Updated: 4:vixie-cron-4.1-77.el5_4.1.x86_64
Jan 28 10:43:32 Updated: tcsh-6.14-14.el5_4.3.x86_64
Jan 28 10:43:32 Updated: acpid-1.0.4-9.el5_4.2.x86_64
Jan 28 10:44:00 Updated: selinux-policy- targeted-2.4.6-255.el5_4.4.noarch
Jan 28 10:44:02 Updated: yum-utils-1.1.16-14.el5.centos.1.noarch
Jan 28 10:44:05 Updated: rpmforge-release-0.5.1-1.el5.rf.x86_64
Jan 28 10:44:06 Updated: yum-fastestmirror-1.1.16-14.el5.centos.1.noarch
Jan 28 10:44:07 Updated: ruby-mode-1.8.5-5.el5_4.8.x86_64
Jan 28 10:44:10 Updated: rubygem-daemons-1.0.10-1.el5.noarch
Jan 28 10:44:14 Updated: ruby-docs-1.8.5-5.el5_4.8.x86_64
Jan 28 10:44:14 Updated: yum-priorities-1.1.16-14.el5.centos.1.noarch
Jan 28 10:45:12 Installed: kernel-xen-2.6.18-164.11.1.el5.x86_64
Jan 28 10:45:17 Updated: glibc-2.5-42.el5_4.3.i686
Jan 28 10:45:17 Updated: krb5-libs-1.6.1-36.el5_4.1.x86_64
Jan 28 10:45:18 Updated: krb5-libs-1.6.1-36.el5_4.1.i386
Jan 28 10:45:21 Updated: openssl-0.9.8e-12.el5_4.1.x86_64
Jan 28 10:45:27 Updated: ruby-libs-1.8.5-5.el5_4.8.x86_64
Jan 28 10:45:28 Updated: openssl-0.9.8e-12.el5_4.1.i686
Jan 28 10:45:29 Updated: ruby-libs-1.8.5-5.el5_4.8.i386
Jan 28 10:45:31 Updated: ruby-1.8.5-5.el5_4.8.x86_64
Jan 28 10:45:32 Updated: libgcc-4.1.2-46.el5_4.2.i386
Jan 28 10:45:33 Updated: libstdc++-4.1.2-46.el5_4.2.x86_64
Jan 28 10:45:33 Updated: expat-1.95.8-8.3.el5_4.2.x86_64
Jan 28 10:45:35 Updated: rubygem-fastthread-1.0.7-1.el5.x86_64
Jan 28 10:45:38 Updated: krb5-workstation-1.6.1-36.el5_4.1.x86_64
Jan 28 10:45:38 Updated: libstdc++-4.1.2-46.el5_4.2.i386
Jan 28 10:45:39 Updated: expat-1.95.8-8.3.el5_4.2.i386
Jan 28 10:45:52 Updated: rubygem-chef-0.7.16-1.el5.noarch
Jan 28 10:45:53 Updated: ruby-irb-1.8.5-5.el5_4.8.x86_64
Jan 28 10:45:54 Updated: ruby-rdoc-1.8.5-5.el5_4.8.x86_64
Jan 28 10:46:09 Updated: ruby-ri-1.8.5-5.el5_4.8.x86_64
Jan 28 10:46:12 Updated: ruby-devel-1.8.5-5.el5_4.8.x86_64
Jan 28 10:46:39 Updated: rubygem-rspec-1.2.9-1.el5.noarch
Jan 28 10:46:49 Updated: rubygem-chef-server-0.7.16-1.el5.noarch
Jan 28 10:46:50 Updated: ruby-devel-1.8.5-5.el5_4.8.i386
Jan 28 10:46:39 Updated: rubygem-rspec-1.2.9-1.el5.noarch
Jan 28 10:46:49 Updated: rubygem-chef-server-0.7.16-1.el5.noarch
Jan 28 10:46:50 Updated: ruby-devel-1.8.5-5.el5_4.8.i386

Bill Levering

KFP: 0C38 4D7E 5B50 94FE 992D  406D 6C81 DE33 5459 A1AC




On Feb 9, 2010, at 10:09 AM, Daniel DeLeo wrote:

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








Attachment: PGP.sig
Description: This is a digitally signed message part




Archive powered by MHonArc 2.6.16.

§