racker/cookbook-cassandra — pull request #9 by cyli (2013-02-21 22:13:50+00:00)
Title: Include the runit recipe in the default cassandra recipe

Otherwise I keep getting this error:

```
================================================================================
Error executing action `enable` on resource 'runit_service[cassandra]'
================================================================================

RuntimeError
------------
Could not locate main runit sv_bin at "/usr/bin/sv". Did you remember to install runit before declaring a "runit_service" resource?

Try adding the following to the top of your recipe:

include_recipe "runit"

Resource Declaration:
---------------------
# In /tmp/chef-solo/cookbooks/cassandra/recipes/default.rb

82: runit_service "cassandra" do
83: default_logger true
84: if node[:cassandra][:max_heap_size] && node[:cassandra][:heap_newsize]
85: options({
86: :has_env => true
87: })
88: env({
89: "MAX_HEAP_SIZE" => node[:cassandra][:max_heap_size],
90: "HEAP_NEWSIZE" => node[:cassandra][:heap_newsize]
91: })
92: end
93: end

Compiled Resource:
------------------
# Declared in /tmp/chef-solo/cookbooks/cassandra/recipes/default.rb:82:in `from_file'

runit_service("cassandra") do
log true
service_dir "/etc/service"
retry_delay 2
log_template_name "cassandra"
sv_bin "/usr/bin/sv"
provider Chef::Provider::Service::Runit
cookbook_name :cassandra
sv_templates true
startup_type :automatic
retries 0
run_template_name "cassandra"
status_command "/usr/bin/sv status /etc/service"
service_name "cassandra"
sv_dir "/etc/sv"
pattern "cassandra"
default_logger true
action :enable
service_mirror # Declared in

service("cassandra") do
retry_delay 2
restart_command "/usr/bin/sv restart /etc/service/cassandra"
provider Chef::Provider::Service::Simple
startup_type :automatic
retries 0
stop_command "/usr/bin/sv stop /etc/service/cassandra"
status_command "/usr/bin/sv status /etc/service/cassandra"
service_name "cassandra"
pattern "cassandra"
start_command "/usr/bin/sv start /etc/service/cassandra"
action [:nothing]
supports {:status=>true, :reload=>true, :restart=>true}
end

finish_script_template_name "cassandra"
supports {:status=>true, :reload=>true, :restart=>true}
recipe_name "default"
end

[Thu, 21 Feb 2013 13:50:07 -0800] ERROR: Running exception handlers
[Thu, 21 Feb 2013 13:50:08 -0800] ERROR: Exception handlers complete
[Thu, 21 Feb 2013 13:50:08 -0800] FATAL: Stacktrace dumped to /tmp/chef-solo/cache/chef-stacktrace.out
[Thu, 21 Feb 2013 13:50:08 -0800] FATAL: RuntimeError: runit_service[cassandra] (cassandra::default line 82) had an error: RuntimeError: Could not locate main runit sv_bin at "/usr/bin/sv". Did you remember to install runit before declaring a "runit_service" resource?

Try adding the following to the top of your recipe:

include_recipe "runit"
```