sensu/sensu-chef — pull request #278 by kenjiskywalker (2014-09-12 03:10:31+00:00)
Title: fix redisio

fixed

```
$ sudo chef-solo -c solo.rb -j roles/sensu_server.json
Starting Chef Client, version 11.16.0
[2014-09-12T02:40:05+00:00] WARN: found a directory sensu-chef in the cookbook path, but it contains no cookbook files. skipping.
Compiling Cookbooks...

================================================================================
Recipe Compile Error in /home/vagrant/chef/cookbooks/sensu/recipes/redis.rb
================================================================================

Chef::Exceptions::ResourceNotFound
----------------------------------
Cannot find a resource matching service[redis6379] (did you define it first?)

Cookbook Trace:
---------------
/home/vagrant/chef/cookbooks/redisio/recipes/enable.rb:25:in `block in from_file'
/home/vagrant/chef/cookbooks/redisio/recipes/enable.rb:23:in `each'
/home/vagrant/chef/cookbooks/redisio/recipes/enable.rb:23:in `from_file'
/home/vagrant/chef/cookbooks/sensu/recipes/redis.rb:23:in `from_file'

Relevant File Content:
----------------------
/home/vagrant/chef/cookbooks/redisio/recipes/enable.rb:

18: # limitations under the License.
19: #
20:
21: redis = node['redisio']
22:
23: redis['servers'].each do |current_server|
24: server_name = current_server["name"] || current_server["port"]
25>> resource = resources("service[redis#{server_name}]")
26: resource.action Array(resource.action)
27: resource.action << :start
28: resource.action << :enable
29: end
30:

Running handlers:
[2014-09-12T02:40:05+00:00] ERROR: Running exception handlers
Running handlers complete
[2014-09-12T02:40:05+00:00] ERROR: Exception handlers complete
[2014-09-12T02:40:05+00:00] FATAL: Stacktrace dumped to /tmp/chef-solo/chef-stacktrace.out
Chef Client failed. 0 resources updated in 8.415939823 seconds
[2014-09-12T02:40:05+00:00] ERROR: Cannot find a resource matching service[redis6379] (did you define it first?)
[2014-09-12T02:40:05+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
$
```