Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chef > 15 issue #166

Open
viv86od opened this issue Mar 27, 2023 · 0 comments
Open

chef > 15 issue #166

viv86od opened this issue Mar 27, 2023 · 0 comments

Comments

@viv86od
Copy link

viv86od commented Mar 27, 2023

Hi,

getting error on chef version higher then 15

NoMethodError

undefined method `td_agent_gem' for cookbook: td-agent, recipe: configure :Chef::Recipe

Cookbook Trace: (most recent call first)

/var/chef/cache/cookbooks/td-agent/recipes/configure.rb:36:in `block in from_file'
/var/chef/cache/cookbooks/td-agent/recipes/configure.rb:25:in `each'
/var/chef/cache/cookbooks/td-agent/recipes/configure.rb:25:in `from_file'
/var/chef/cache/cookbooks/td-agent/recipes/default.rb:9:in `from_file'
/var/chef/cache/cookbooks/base/recipes/_td_agent.rb:34:in `from_file'
/var/chef/cache/cookbooks/base/recipes/chef.rb:130:in `from_file'
/var/chef/cache/cookbooks/base/recipes/default.rb:168:in `from_file'

Relevant File Content:

/var/chef/cache/cookbooks/td-agent/recipes/configure.rb:

29: plugin true
30: %w{action version source options gem_binary}.each do |attr|
31: send(attr, plugin_attributes[attr]) if plugin_attributes[attr]
32: end
33: notifies :restart, "service[td-agent]", :delayed
34: end
35: elsif plugin.is_a?(String)
36>> td_agent_gem plugin do
37: plugin true
38: notifies :restart, "service[td-agent]", :delayed
39: end
40: end
41: end
42:
43: service "td-agent" do
44: supports :restart => true, :reload => (reload_action == :reload), :status => true
45: restart_command "/etc/init.d/td-agent restart || /etc/init.d/td-agent start"

System Info:

chef_version=16.18.30
platform=ubuntu
platform_version=16.04
ruby=ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
program_name=/usr/bin/chef-client
executable=/opt/chef/bin/chef-client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant