rp346
rp346

Reputation: 7068

simple-kibana dependency cookbook faild

I am trying to use simple-kibana (https://github.com/jsirex/simple-kibana-cookbook) for which I have written wrapper cookbook. simple-kibana has dependency on ark & runit.

When I run chef on node it fails with following error :

================================================================================
    Recipe Compile Error in /var/cache/chef/cookbooks/ark/attributes/default.rb
================================================================================

NoMethodError
-------------
undefined method `+' for nil:NilClass

Cookbook Trace:
---------------
  /var/cache/chef/cookbooks/ark/attributes/default.rb:14:in `from_file'

Relevant File Content:
----------------------
/var/cache/chef/cookbooks/ark/attributes/default.rb:

    7:  else
    8:    default['ark']['tar'] = '/bin/tar'
    9:  end
    10:
    11:  pkgs = %w(libtool autoconf) unless platform_family?('mac_os_x','windows')
    12:  pkgs += %w(unzip rsync make gcc) unless platform_family?('mac_os_x','windows')
    13:  pkgs += %w(autogen) unless platform_family?('rhel', 'fedora', 'mac_os_x', 'suse','windows')
    14>> pkgs += %w(gtar) if platform?('freebsd')
    15:
    16:  default['ark']['package_dependencies'] = pkgs
    17:

Can anyone help me to fix this. I am on centos 6.4

thanks

Upvotes: 0

Views: 79

Answers (1)

Tejay Cardon
Tejay Cardon

Reputation: 4223

Wow, that's odd. So, two issues off the bat.

  1. It appears that ohai thinks you are on a freebsd node, otherwise it wouldn't be evaluating line 14.
  2. Unless a default value for pkgs is being set prior to line 11 (and the error says it isn't), then pkgs has no value at lines 13 and 14 unless you're on mac_os_x or windows, and this attributes file will fail for rhel, fedora, suse, and freebsd

Upvotes: 1

Related Questions