Funky.  This is still an improvement despite the Celluloid issue, yeah?


On Tue, Nov 12, 2013 at 7:17 PM, Peter Fern <notifications@github.com>wrote:

> In handlers/other/chef_node.rb:
>
> >        end
> > -    end
> > -    begin
> > -      timeout(8) do
> > -        !!Spice.node(@event["client"]["name"])
> > +    # FIXME: Why is this necessary?  Ridley works fine outside of Sensu
> > +    rescue Celluloid::Error
> > +      Celluloid.boot
> > +      retried += 1
> > +      if retried < 2
> > +        retry
> > +      else
> > +        puts "CHEF-NODE: Ridley is broken: #{error.inspect}"
>
> Yeah, Ridley sets up it's own pool, rather than using the Celluloid init
> codepath, and for some reason that doesn't get initialized when I use it
> here. The Celluloid setup in Ridley was doing my head in though...
>
> Here's the backtrace:
>
> /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:28:in `assert_running': Thread pool is not running (Celluloid::Error)
>         from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:64:in `block in get'
>         from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:63:in `synchronize'
>         from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:63:in `get'
>         from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/thread_handle.rb:10:in `initialize'
>         from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:155:in `new'
>         from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:155:in `initialize'
>         from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid.rb:188:in `new'
>         from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.15.2/lib/celluloid.rb:188:in `new'
>         from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/ridley-1.7.1/lib/ridley/client.rb:34:in `open'
>         from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/ridley-1.7.1/lib/ridley.rb:51:in `open'
>         from /etc/sensu/handlers/other/chef_node.rb:51:in `chef_node_exists?'
>         from /etc/sensu/handlers/other/chef_node.rb:80:in `handle'
>         from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-plugin-0.1.7/lib/sensu-handler.rb:41:in `block in <class:Handler>'
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/sensu/sensu-community-plugins/pull/345/files#r7616009>
> .
>



-- 

☮
Nick Stielau
206-245-7991