chef-sentry-handler icon indicating copy to clipboard operation
chef-sentry-handler copied to clipboard

Doesn't work

Open bitphage opened this issue 10 years ago • 1 comments

chef 12.5.1 chef-sentry-handler latest from git chef_handler 1.2.0

chef-client -linfo -o "recipe[chef-sentry-handler]"
[...]
================================================================================
  Recipe Compile Error in /var/chef/cache/cookbooks/chef-sentry-handler/recipes/default.rb
  ================================================================================

  ArgumentError
  -------------
  chef_handler[Raven::Chef::SentryHandler] (chef-sentry-handler::default line 26) had an error: ArgumentError: wrong number of arguments (1 for 0)

  Cookbook Trace:
  ---------------
    /var/chef/cache/cookbooks/chef_handler/providers/default.rb:43:in `new'
    /var/chef/cache/cookbooks/chef_handler/providers/default.rb:43:in `block (2 levels) in class_from_file'
    /var/chef/cache/cookbooks/chef_handler/providers/default.rb:40:in `block in class_from_file'
    /var/chef/cache/cookbooks/chef-sentry-handler/recipes/default.rb:31:in `from_file'

  Relevant File Content:
  ----------------------
  /var/chef/cache/cookbooks/chef_handler/providers/default.rb:

   36:      end
   37:    end
   38:    
   39:    handler = nil
   40:    converge_by("load #{class_name} from #{new_resource.source}") do
   41:      require new_resource.source
   42:      _, klass = get_class(class_name)
   43>>     handler = klass.send(:new, *collect_args(new_resource.arguments))
   44:    end
   45:  
   46:    new_resource.supports.each do |type, enable|
   47:      if enable
   48:        converge_by("enable #{new_resource} as a #{type} handler") do
   49:          register_handler(type, handler)
   50:        end
   51:      end
   52:    end


  Running handlers:
  Running handlers complete
  Chef Client failed. 1 resources updated in 06 seconds

bitphage avatar Nov 13 '15 11:11 bitphage

diff --git a/files/default/sentry.rb b/files/default/sentry.rb
index 026bd85..65b8844 100644
--- a/files/default/sentry.rb
+++ b/files/default/sentry.rb
@@ -4,7 +4,7 @@ module Raven
   module Chef
     class SentryHandler < ::Chef::Handler
       def initialize(node)
-        Raven.configure(true) do |config|
+        Raven.configure do |config|
           config.ssl_verification = node['sentry']['verify_ssl']
           config.dsn = node['sentry']['dsn']
           config.logger = ::Chef::Log

bitphage avatar Nov 17 '15 12:11 bitphage