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

[systemd] Frequent agent service restarts can lead to chef run failures #467

Closed
olivielpeau opened this issue Sep 19, 2017 · 0 comments
Closed
Labels
Milestone

Comments

@olivielpeau
Copy link
Member

Happens on systemd-based systems when a lot of integrations are being added by the cookbook. The datadog_monitor resource restarts the agent after each integration file is added, which can make the service hit the maximum number of restarts allowed by systemd by default (5 every 10 seconds). That limit also applies to "manual" restarts of the service.

We get the following error in systemd's journal:

datadog-agent.service: Start request repeated too quickly.
systemd[1]: Failed to start "Datadog Agent".

Root cause: the service resource in datadog_monitor is different from the one in the main chef run (chef limitation, custom resources have their own resource collection), so the restarts that happen there are done immediately instead of being queued up nicely at the end of the run.

The Right Fix would be to remove the service definition from datadog_monitor and make all invocations of datadog_monitor notify a restart on the global service resource, see #323

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

No branches or pull requests

1 participant