Nagios cookbook fails to install on a new node


#1

I am receiving the following error, when attempting to install the nagios cookbook for the first time.

NoMethodError: undefined method sysadmins' for Chef::Resource::Template /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource.rb:148:inmethod_missing’
/var/chef/cache/cookbooks/nagios/recipes/apache.rb:15:in block in from_file' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/mixin/recipe_definition_dsl_core.rb:74:ininstance_eval’
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/mixin/recipe_definition_dsl_core.rb:74:in method_missing' /var/chef/cache/cookbooks/nagios/recipes/apache.rb:9:infrom_file’

It appears to be failing the compilation phase, due to an undefined variable in recipes/apache.rb.

14 variables(
15 :sysadmins => sysadmins
16 )

It looks as though the following commit broke it. The code above was removed from servers.rb and re-factored into apache.rb. Am I smoken something? Has anyone gotten this to work. The change happened way back in April.

commit 74d6547f91c22cce74e74b34e9a18ff3912d8e21

John


#2

Hi John,
On Aug 28, 2012, at 8:55 PM, John Dewey john@dewey.ws wrote:

It appears to be failing the compilation phase, due to an undefined variable in recipes/apache.rb.

14 variables(
15 :sysadmins => sysadmins
16 )

It looks as though the following commit broke it. The code above was removed from servers.rb and re-factored into apache.rb. Am I smoken something? Has anyone gotten this to work. The change happened way back in April.

commit 74d6547f91c22cce74e74b34e9a18ff3912d8e21

This is fixed in the master branch but hasn’t been released yet.

There are 20 resolved tickets in the nagios cookbook component on tickets.opscode.com, and not all of them have been merged yet.

We have a code review meeting tomorrow, and we’ll spend some time on more, for sure.


Opscode, Inc
Joshua Timberman, Technical Program Manager
IRC, Skype, Twitter, Github: jtimberman