voxpupuli / puppet-icinga2

Puppet module to manage Icinga 2
https://forge.puppet.com/icinga/icinga2
Apache License 2.0
62 stars 94 forks source link

undefined method `keys' for []:Array #261

Closed LorenzBischof closed 7 years ago

LorenzBischof commented 7 years ago

I get the following error after updating to the latest 1.2 version:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `keys' for []:Array at /etc/puppet/environments/update_icinga_module/modules/forge/icinga2/manifests/config.pp:26 on node

I set one constant via Hieradata:

icinga2::constants:                                                                           
    PluginContribDir: "%{lib_dir}/nagios/plugins/custom"  
unki commented 7 years ago

Maybe related - since updated to 1.2.0 I get an error in config.pp:26 as well, but with different error message:

2017-03-17 06:44:03,669 ERROR [qtp2077010719-1969] [puppetserver] Puppet Server Error: Evaluation Error: Error while evaluating a Function Call, wrong number of arguments calling `attributes` (4 for 3) at /usr/share/puppet/modules/icinga2/manifests/config.pp:26:28 on node odin.netshadow.net
/usr/share/puppet/modules/icinga2/lib/puppet/parser/functions/icinga2_attributes.rb:25:in `real_function_icinga2_attributes'
/usr/lib/ruby/vendor_ruby/puppet/parser/functions.rb:174:in `function_icinga2_attributes'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/parser/functions.rb:167:in `function_icinga2_attributes'
/usr/share/puppet/modules/icinga2/manifests/config.pp:26:in `stack'
choonming commented 7 years ago

Seems like its the latest module.

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, wrong number of arguments calling `attributes` (4 for 3) at /etc/puppetlabs/code/environments/production/modules/icinga2/manifests/config.pp:26:28

@lbetz @bobapple any chance of fixing this soon?

Reamer commented 7 years ago

@choonming Do you have clear your puppetmaster cache (restart)?

lbetz commented 7 years ago

@Reamer good point! That# an explanation why I'm not able to reproduced this error.

choonming commented 7 years ago

@Reamer @lbetz the problem is now resolved after the restart