[chef] Re: Problems with log stash cookbook and environment attributes


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Problems with log stash cookbook and environment attributes
  • Date: Thu, 8 Aug 2013 12:13:24 -0700


On Tuesday, July 30, 2013 at 1:10 PM, Cassiano Leal wrote:

I’m having trouble using the community logstash cookbook with environment parameters.


When it tries to create shipper.conf it fails here:


Chef::Mixin::Template::TemplateError (comparison of String with Chef::Node::ImmutableMash failed) on line #13:
 
11: }
12: <% else %>
13: <%= LogstashConf.section_to_str(node['logstash']['agent']['inputs']) %>
14: <% end -%>
15: }

The full stack trace and the environment JSON can be found here: https://gist.github.com/cassianoleal/6116305

I have successfully used this cookbook on another environment when setting [:logstash][:agent][:inputs] via node.override in a recipe. What’s wrong with this approach?

Cheers,
If you haven't figured this out yet, it looks like you're ending up in a situation where the log stash cookbook has an array like:

  [ "string", "another string", {:attribute_data => "some data"}]

… And then calls #sort on that array. This implies that `node['logstash']['agent']['inputs']` is expected to be a string but is a hash instead. Or something like that.

-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§