[chef] Chef 10.2 issues saving a role


Chronological Thread 
  • From: andi abes < >
  • To:
  • Subject: [chef] Chef 10.2 issues saving a role
  • Date: Fri, 12 Aug 2011 14:00:59 -0400

So, our app plays around, programatically manipulating roles. Recently we've been seeing this, for some instances: 


Aug 12 15:37:24 admin crowbar_app[11694]: /usr/lib/ruby/gems/1.8/gems/chef0.10.2/lib/chef/run_list.rb:78:in `=='
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb:68:in `include?'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb:68:in `encode'/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb:18:in `__send__'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb:18:in `encode'
/usr/lib/ruby/gems/1.8/gems/activesupport-.3.5/lib/active_support/json/encoders/enumerable.rb:11:in `to_json'
/usr/lib/ruby/gems/1.8/gems/activesupport2.3.5/lib/active_support/json/encoders/enumerable.rb:11:in`map'
/usr/lib/ruby/gems/1.8/gems/activesupport-.3.5/lib/active_support/json/encoders/enumerable.rb:11:in `to_json'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.2/lib/chef/run_list.rb:88:in `to_json'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb:70:in `encode'


Looking at run_list == ():

    def ==(other)
      if other.kind_of?(Chef::RunList)
        other.run_list_items == @run_list_items
      else
        return false unless other.respond_to?(:size) && (other.size == @run_list_items.size)
=>        other_run_list_items = other.dup

=>        other_run_list_items.map! { |item| coerce_to_run_list_item(item) }
        other_run_list_items == @run_list_items
      end
    end


If Other is a String,  it seems that it would be duped and then try to apply map! to it.
If, that is the size of the string happens to exactly be the number of run_list items...






  • [chef] Chef 10.2 issues saving a role, andi abes, 08/12/2011

Archive powered by MHonArc 2.6.16.

§