-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add checks to ensure reloading of units if the configuration actually changed. #34346
Conversation
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
I have tested this locally with the Elastic Agent with current 8.6.1 commits (including my fix for missing output configuration) and I am seeing this fix the behavior of the beats being restarted when they don't need to be. I have tested:
|
I think we should get this merged ASAP to be in 8.6.1, I think the change is very safe and easy to follow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, review looks good. I haven't had a chance to test it yet but I can do that while we wait for the 8.6.1 backport to be ready.
The format step was skipped in elastic#34346
The format step was skipped in #34346
Tested locally as well, confirming this works as expected. |
The format step was skipped in #34346
… configuration actually changed. (#34348) * Add checks to ensure reloading of units if the configuration actually changed. (#34346) * Add checks to ensure reloading of units if the configuration actually changed. * Add changelog entry. (cherry picked from commit 5b1f828) * Run make check and commit the changes. (#34349) The format step was skipped in #34346 Co-authored-by: Blake Rouse <[email protected]> Co-authored-by: Craig MacKenzie <[email protected]>
@oren-zohar you will want to pick up this change in Cloudbeat to avoid unnecessary process restarts when the agent policy changes. |
… changed. (#34346) * Add checks to ensure reloading of units if the configuration actually changed. * Add changelog entry.
The format step was skipped in #34346
What does this PR do?
Improved the
managerV2
to not perform reloading of the output or inputs if the configuration has not changed.Why is it important?
Before this change any change in a single unit (including state and log level) would result in all units being reloaded even if that units configuration didn't change. To make it worse when
stopOnEmptyUnits
is true any little change, like log level would cause the entire beat to restart.Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues