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

added condition to service property #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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