munin
munin copied to clipboard
Missing service_name
I have no idea why this is happening... was working before.
Running 1.4.3 on Ubuntu 12.04 w/ vagrant and chef-solo
Chef::Exceptions::InvalidResourceSpecification
The string service[]' is not valid for resource collection lookup. Correct syntax is
resource_type[resource_name]'
Cookbook Trace:
/etc/chef/chef-solo-1/cookbooks/munin/recipes/client.rb:50:in `block in from_file'
Relevant File Content:
/etc/chef/chef-solo-1/cookbooks/munin/recipes/client.rb:
43: 44: package 'munin-node' 45: 46: template "#{node['munin']['basedir']}/munin-node.conf" do 47: source 'munin-node.conf.erb' 48: mode '0644' 49: variables :munin_server_ips => munin_server_ips 50>> notifies :restart, "service[#{service_name}]" 51: end 52: 53: case node['platform'] 54: when 'arch', 'smartos' 55: execute 'munin-node-configure --shell | sh' do 56: not_if { Dir.entries(node['munin']['plugins']).length > 2 } 57: notifies :restart, "service[#{service_name}]" 58: end 59: end
It works when I explicitly set node.default['munin']['service_name'] = "munin-node" but then fails further down the line almost as if the attributes file doesn't exist....
Please tell me I'm missing something silly :)
so... more weirdness. If I have node.default['munin']['server_list'] set, then it fails with the above, but If I don't have that set, then it fails (where it should if the attribute isn't set) at line 21:
undefined method `[]' for nil:NilClass
21>> service_name = node['munin']['service_name']