sensu-chef
sensu-chef copied to clipboard
Sensu installation fails due to rabbitmq cookbook
Chef::Exceptions::ResourceNotFound
----------------------------------
Cannot find a resource matching template[/etc/rabbitmq/rabbitmq.config] (did you define it first?)
Cookbook Trace:
---------------
/var/cache/chef/cookbooks/sensu/recipes/rabbitmq.rb:88:in `block in from_file'
/var/cache/chef/cookbooks/sensu/recipes/rabbitmq.rb:85:in `from_file'
/var/cache/chef/cookbooks/wrapper_sensu_cookbook/recipes/rabbitmq.rb:17:in `from_file'
Relevant File Content:
----------------------
/var/cache/chef/cookbooks/sensu/recipes/rabbitmq.rb:
81:
82: include_recipe "rabbitmq"
83: include_recipe "rabbitmq::mgmt_console"
84:
85: service "restart #{node["rabbitmq"]["service_name"]}" do
86: service_name node["rabbitmq"]["service_name"]
87: action :nothing
88>> subscribes :restart, resources("template[#{node['rabbitmq']['config_root']}/rabbitmq.config]"), :immediately
89: end
90:
91: rabbitmq = node["sensu"]["rabbitmq"].to_hash
92:
93: config_item = node["sensu"]["data_bag"]["config_item"]
94: sensu_config = Sensu::Helpers.data_bag_item(config_item, true, data_bag_name)
95:
96: if sensu_config && sensu_config["rabbitmq"].is_a?(Hash)
97: rabbitmq = Chef::Mixin::DeepMerge.merge(rabbitmq, sensu_config["rabbitmq"])
Platform:
---------
x86_64-linux
Expected Behavior
Current Behavior
Possible Solution
Steps to Reproduce (for bugs)
Context
Your Environment
- Version of this cookbook used: 4.0.6
- Version of RabbitMQ cookbook: 5.6.3
- Version of Sensu used: 1.5.0-1
- Version of Chef used: 12.19.36
- Operating System and version (e.g. CentOS 7, Ubuntu 14.04): Ubuntu 14.04 & Ubuntu 16.04
- Link to your project:
Hey I took a quick look at it looks to be caused by: https://github.com/rabbitmq/chef-cookbook/pull/505 I believe you should be able to pin the version of the rabbitmq cookbook in your wrapper to: 5.6.1 I have not had a chance to look at what a fix looks like as we need to be careful to not break any existing setups that use prior versions before this change happened. Since we loosely pin our versions there are likely people running multiple versions.
Instead of pinning to 5.6.1
, use 5.7.2
(or 5.7.3
which is about to be shipped) and configure RabbitMQ version to 3.7.13
.
RabbitMQ 3.6.x has been out of support and RabbitMQ Chef cookbook 5.7.x
is the last series that supports it in any capacity.
This can be closed as a duplicate of https://github.com/rabbitmq/chef-cookbook/issues/506.