-
Notifications
You must be signed in to change notification settings - Fork 120
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
new gems are not loaded properly causing td-agent service reload/restart failure #75
Comments
Some more info on this - it appears to be the service reload feature that is not working - which may be a problem with the td-agent init script. A workaround solution to this is to add a delayed restart notify in the td_agent_source or td_agent_match call, like so:
So in summary I think the issue is that the service td-agent reload command is not picking up td-agent gems that were installed after the td-agent server was started. |
I also ran into this issue yesterday and today. The reload command seems to simply reload the config, and not load plugins. I did what you did above and put a notifies :restart action in my plugin install resource |
I think I am running into this same issue, using Everything I try fails with
both on 2.2.0 as it does on 2.2.1. @nick-james's workaround sadly did nothing for me. |
Hi @petetnt, yes I also noticed that the original workaround stopped working for us a month or two ago. I'm not entirely sure why this was, as it stopped working in 2.2.0 which was the version I used in the original workaround above - so presumably some underlying dependencies(s) have changed. Anyway, here is how I got it working again (not pretty I'm afraid!):
I also have this in my metadata file, for other reasons, but it could well be one of the underlying dependencies that affects the above.
|
Hmm... which chef-td-agent code should be fixed? |
I'm not sure, td-agent v2.3.0 might not have the problem. However v2.3.2 might have it. For example my recipe was the following (I don't use treasure-data/chef-td-agent). This has the problem with v2.3.2. service 'td-agent' do
action [:enable, :start]
supports restart: true, reload: true, status: true
end
cookbook_file '/etc/td-agent/conf.d/app.rb' do
notifies :reload, 'service[td-agent]'
end
gem_package 'fluent_plugin-zabbix' do
gem_binary 'td-agent-gem'
notifies :reload, 'service[td-agent]'
end I have changed 'reload' to 'restart'. It has no problem with v2.3.2. service 'td-agent' do
action [:enable, :start]
supports restart: true, reload: true, status: true
end
cookbook_file '/etc/td-agent/conf.d/app.rb' do
notifies :restart, 'service[td-agent]'
end
gem_package 'fluent-plugin-zabbix' do
gem_binary 'td-agent-gem'
notifies :restart, 'service[td-agent]'
end |
I can confirm the issue is still there. Any plans to solve it ? Issue seems fixed by redefining the
Should it be removed ? |
When trying to install td-agent together with the fluent-plugin-elasticsearch plugin, the fluent-plugin-elasticsearch is successfully installed, but the initial restart/reload of the server during the install procedure fails - so after the chef-client has run td-agent is not running, but should be. However when the td-agent server is manually restarted following the installation then it starts fine ( which shows the elasticsearch gem was installed and the td-agent config is OK).
Here is the recipe I am running to install td-agent:
Here are the relevant attributes:
I am running this using test kitchen with the latest chef client (12.6.0-1) on ubuntu 14.04
And on the ubuntu 14.04 machine itself this is the output I see from the td-agent server log (all from during chef run):
td-agent is not running after the chef run:
But if I manually restart it then it works fine:
And there are now no errors in the td-agent log:
The text was updated successfully, but these errors were encountered: