Skip to content

Conversation

@bjozet
Copy link

@bjozet bjozet commented Oct 11, 2021

td-agent v4 does not ship /etc/init.d/td-agent file for distros that use
systemd (ubuntu focal, for example maybe also others). This makes
chef-client fail to run restart of service, since that was hardcoded to
use init.d script.

This adds a condistion to only set that property if the file actually
esists. If it doesn't exist, then chefs service-mechanism will default
to using whatever is available (systemd in this case) and the chef-run
succeeds to restart the service properly.

td-agent v4 does not ship /etc/init.d/td-agent file for distros that use
systemd (ubuntu focal, for example maybe also others). This makes
chef-client fail to run restart of service, since that was hardcoded to
use init.d script.

This adds a condistion to only set that property if the file actually
esists. If it doesn't exist, then chefs service-mechanism will default
to using whatever is available (systemd in this case) and the chef-run
succeeds to restart the service properly.
@bjozet
Copy link
Author

bjozet commented Oct 11, 2021

The "offending" line in recipes/configure.rb: https://github.com/treasure-data/chef-td-agent/blob/master/recipes/configure.rb#L45

closes #151

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

Successfully merging this pull request may close these issues.

1 participant