You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.
I've been running into an issue with chef-client runs after adding this handler that causes the check-in to fail due to a missing /var/chef/handlers directory.
Chef::Exceptions::EnclosingDirectoryDoesNotExist
------------------------------------------------
cookbook_file[/var/chef/handlers/slack_handler_util.rb] (slack_handler::default line 37) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /var/chef/handlers does not exist.
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/slack_handler/recipes/default.rb:42:in `from_file'
/var/chef/cache/cookbooks/cascade-cloud-instance/recipes/default.rb:22:in `from_file'
/var/chef/cache/cookbooks/cloud-client-tdi/recipes/default.rb:10:in `from_file'
Relevant File Content:
----------------------
/var/chef/cache/cookbooks/slack_handler/recipes/default.rb:
35: end
36:
37: cookbook_file "#{node['chef_handler']['handler_path']}/slack_handler_util.rb" do
38: source 'slack_handler_util.rb'
39: mode "0600"
40: action :nothing
41: # end
42>> end.run_action(:create)
43:
44: cookbook_file handler_file do
45: source handler_source
46: mode "0600"
47: action :nothing
48: # end
49: end.run_action(:create)
50:
51: chef_handler "Chef::Handler::Slack" do
Platform:
---------
x86_64-linux
Node is running on Amazon Linux (ami-0b33d91d) and is already bootstrapped. What's strange is didn't run into this issue when originally setting things up in test with the same exact setup.
Is it recommended to manually ensure /var/chef/handlers exists before including the recipe, or is this an issue with the Slack handler?
The text was updated successfully, but these errors were encountered:
The reason is that chef_handler 3.0.0 was released a couple of days ago which has a breaking change.
There are 2 solutions
Pin the slack_handler cookbook dependency on chef_handler version 2.x
Pin the slack_handler cookbook dependency on chef_handler version 3.x.x and rewrite the slack_handler cookbook to use the new lwrp syntax in chef_handler 3.x.x
I've been running into an issue with
chef-client
runs after adding this handler that causes the check-in to fail due to a missing/var/chef/handlers
directory.Code
As simple as the following:
Stack Trace
Node is running on Amazon Linux (ami-0b33d91d) and is already bootstrapped. What's strange is didn't run into this issue when originally setting things up in test with the same exact setup.
Is it recommended to manually ensure
/var/chef/handlers
exists before including the recipe, or is this an issue with the Slack handler?The text was updated successfully, but these errors were encountered: