treasure-data / chef-td-agent

Chef Cookbook for td-agent (Treasure Agent or Fluentd)
https://supermarket.chef.io/cookbooks/td-agent
Apache License 2.0
127 stars 121 forks source link

td_agent_gem raise error in why-run mode when a machine was not installed td-agent yet. #41

Open nazoking opened 9 years ago

nazoking commented 9 years ago

recipe is

node.default[:td_agent][:plugins] = [
  "record-reformer"
]

include_recipe 'td-agent'

error is

  * td-agent_gem[record-reformer] action install
================================================================================
Error executing action `install` on resource 'td-agent_gem[record-reformer]'
================================================================================

Errno::ENOENT
-------------
No such file or directory - /usr/lib64/fluent/ruby/bin/fluent-gem env gempath

Resource Declaration:
---------------------
# In /home/ec2-user/chef-solo/cookbooks-2/td-agent/recipes/default.rb

113:     td_agent_gem plugin do
114:       plugin true
115:     end
116:   end

Compiled Resource:
------------------
# Declared in /home/ec2-user/chef-solo/cookbooks-2/td-agent/recipes/default.rb:113:in `block in from_file'

td_agent_gem("record-reformer") do
  provider Chef::Provider::Package::TdRubygems
  action :install
  retries 0
  retry_delay 2
  cookbook_name :"td-agent"
  recipe_name "default"
  plugin true
  package_name "fluent-plugin-record-reformer"
  gem_binary "/usr/lib64/fluent/ruby/bin/fluent-gem"
end
carlosrochap commented 8 years ago

I'm having a similar issue, but I see that this issue is pretty old