SNS Handler Cookbook


#1

I’m trying to use the chef-handler-sns cookbook.

#recipes/default.rb:
include_recipe “chef_handler_sns”

#metadata.rb:
depends ‘chef_handler_sns’

#attributes/default.rb
default[‘chef_handler_sns’][‘topic_arn’] =
"arn:aws:sns:us-east-1:11111111:something"
default[‘chef_handler_sns’][‘version’] = ‘1.2.0’

Bringing vagrant up results in the following. I can’t find any reference to
full_name in the cookbook and line 93 in the recipe doesn’t even seem
related.

==> default: NoMethodError
==> default: -------------
==> default: undefined method full_name' for nil:NilClass ==> default: ==> default: ==> default: Cookbook Trace: ==> default: --------------- ==> default: /tmp/vagrant-chef/2ee54ddb22b66d5b5705792eddf1327f/cookbooks/chef_handler_sns/providers/default.rb:93:inblock in class_from_file’
==> default:
==> default:
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In
/tmp/vagrant-chef/2ee54ddb22b66d5b5705792eddf1327f/cookbooks/chef_handler_sns/providers/default.rb
==> default:
==> default: 93: chef_gem ‘chef-handler-sns’ do
==> default: 94: version gem_version
==> default: 95: options(:prerelease => true) if gem_prerelease
==> default: 96: end
==> default: 97: else
==> default:
==> default:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in
/tmp/vagrant-chef/2ee54ddb22b66d5b5705792eddf1327f/cookbooks/chef_handler_sns/providers/default.rb:93:in
`block in class_from_file’
==> default:
==> default: chef_gem(“chef-handler-sns”) do
==> default: provider Chef::Provider::package::Rubygems
==> default: action :install
==> default: retries 0
==> default: retry_delay 2
==> default: guard_interpreter :default
==> default: options {:prerelease=>true}
==> default: package_name “chef-handler-sns”
==> default: version “1.2.0”
==> default: cookbook_name :chef_handler_sns
==> default: end
==> default:
==> default:
==> default:
==> default:
==> default:

==> default: Error executing action enable on resource
’chef_handler_sns[arn:aws:sns:us-east-1:11111111:something]’
==> default:

==> default:
==> default:
==> default: NoMethodError
==> default: -------------
==> default: chef_gem[chef-handler-sns]
(/tmp/vagrant-chef/2ee54ddb22b66d5b5705792eddf1327f/cookbooks/chef_handler_sns/providers/default.rb
line 93) had an error: NoMethodError: undefined method full_name' for nil:NilClass ==> default: ==> default: ==> default: Cookbook Trace: ==> default: --------------- ==> default: /tmp/vagrant-chef/2ee54ddb22b66d5b5705792eddf1327f/cookbooks/chef_handler_sns/providers/default.rb:93:inblock in class_from_file’
==> default:
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In
/tmp/vagrant-chef/2ee54ddb22b66d5b5705792eddf1327f/cookbooks/chef_handler_sns/recipes/default.rb
==> default:
==> default: 20: chef_handler_sns node[‘chef_handler_sns’][‘topic_arn’]
==> default:
==> default:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in
/tmp/vagrant-chef/2ee54ddb22b66d5b5705792eddf1327f/cookbooks/chef_handler_sns/recipes/default.rb:20:in
`from_file’
==> default:
==> default: chef_handler_sns(“arn:aws:sns:us-east-1:11111111:something”) do
==> default: action :enable
==> default: retries 0
==> default: retry_delay 2
==> default: guard_interpreter :default
==> default: cookbook_name :chef_handler_sns
==> default: recipe_name “default”
==> default: topic_arn “arn:aws:sns:us-east-1:11111111:something”
==> default: version “1.2.0”
==> default: end
==> default:
==> default:
==> default:
==> default: [2015-09-23T17:17:33+00:00] INFO: Running queued delayed
notifications before re-raising exception
==> default: [2015-09-23T17:17:33+00:00] ERROR: Running exception handlers