Skip to content

Instantly share code, notes, and snippets.

@eherot
Created September 6, 2013 16:52
Show Gist options
  • Save eherot/6466532 to your computer and use it in GitHub Desktop.
Save eherot/6466532 to your computer and use it in GitHub Desktop.
Inexplicable rsyslog failure on attribute lookup
$ sudo chef-client
Starting Chef Client, version 11.6.0
resolving cookbooks for run list: ["et_base", "logserver"]
Synchronizing Cookbooks:
- et_base
- chef-solo-search
- apt
- postfix
- chef_handler
- yum
- sudo
- motd
- build-essential
- vim
- logrotate
- ntp
- et_users
- et_hostname
- git
- dmg
- windows
- runit
- chef-client
- cron
- et_monitoring
- copperegg
- newrelic
- php
- xml
- mysql
- openssl
- python
- apache2
- et_networking_basic
- networking_basic
- et_tools
- et_logger
- rsyslog
- logserver
- redis
- stunnel
- discovery
- kibana
- nginx
- ohai
- htpasswd
- elasticsearch
- ark
- logstash
- rbenv
- java
- ant
- rabbitmq
- erlang
- yumrepo
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/et_base/recipes/default.rb
================================================================================
Chef::Exceptions::InvalidResourceSpecification
----------------------------------------------
The string `service[]' is not valid for resource collection lookup. Correct syntax is `resource_type[resource_name]'
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/rsyslog/recipes/default.rb:38:in `block in from_file'
/var/chef/cache/cookbooks/rsyslog/recipes/default.rb:34:in `from_file'
/var/chef/cache/cookbooks/et_logger/recipes/default.rb:20:in `from_file'
/var/chef/cache/cookbooks/et_base/recipes/default.rb:39:in `block in from_file'
/var/chef/cache/cookbooks/et_base/recipes/default.rb:38:in `each'
/var/chef/cache/cookbooks/et_base/recipes/default.rb:38:in `from_file'
Relevant File Content:
----------------------
/var/chef/cache/cookbooks/rsyslog/recipes/default.rb:
31:
32: # Our main stub which then does its own rsyslog-specific
33: # include of things in /etc/rsyslog.d/*
34: template "/etc/rsyslog.conf" do
35: source 'rsyslog.conf.erb'
36: mode 0644
37: variables(:protocol => node['rsyslog']['protocol'])
38>> notifies :restart, "service[#{node['rsyslog']['service_name']}]"
39: end
40:
41: template "/etc/rsyslog.d/50-default.conf" do
42: source "50-default.conf.erb"
43: backup false
44: mode 0644
45: notifies :restart, "service[#{node['rsyslog']['service_name']}]"
46: end
47:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment