-
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
Fix issue where updating a single unit results in other units being turned off #34504
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
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.
LGTM
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.
Needs a test case (and to fix the existing unit tests it seems). You will have to manually backport to the 8.7.0 branch if this doesn't merge by the end of today.
} | ||
} | ||
|
||
if !changed { |
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.
We should add a regression unit test for this bug before merging.
@cmacknz The unit test is actually testing that path, that is why the test is failing. The code is actually not working for stopping, just noticed that in local testing as well. Working on a fix and will do some more testing. |
Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co>
@cmacknz Local testing is looking good, would like to get an extra set of testing on this PR before merging. Could you give it a test as well? |
I don't see any new tests that would have caught the problem we are fixing here. I am concerned this bug might come back because there is nothing stopping that from happening. Can we write a test that ensures that a change that results in no unit config changes (like a log level change) preserves the set of input units that should have been running? This needs to make the 8.6.2 feature freeze which is EOD Thursday. The 8.7 FF is today but since this is a bug fix we can backport it in after that. We have time to add an additional test I think. |
@cmacknz I modified the current test to catch the bad case. I verified this by removing all the changes I had added in managerV2 and ensuring that the test failed. Then I placed my modified code back into the managerV2 and the test past, so catching this error is now covered by the unit test. |
Thanks! Test LGTM. |
…urned off (#34504) * Reload all inputs when only one changes. * Update changelog. * Fix stopping case. * Update CHANGELOG.next.asciidoc Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co> * Adjust test to catch bad case. --------- Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co> (cherry picked from commit 9f15870)
…urned off (#34504) * Reload all inputs when only one changes. * Update changelog. * Fix stopping case. * Update CHANGELOG.next.asciidoc Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co> * Adjust test to catch bad case. --------- Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co> (cherry picked from commit 9f15870)
…urned off (#34504) (#34546) * Reload all inputs when only one changes. * Update changelog. * Fix stopping case. * Update CHANGELOG.next.asciidoc Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co> * Adjust test to catch bad case. --------- Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co> (cherry picked from commit 9f15870) Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
…urned off (#34504) (#34545) * Reload all inputs when only one changes. * Update changelog. * Fix stopping case. * Update CHANGELOG.next.asciidoc Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co> * Adjust test to catch bad case. --------- Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co> (cherry picked from commit 9f15870) Co-authored-by: Blake Rouse <blake.rouse@elastic.co>
…urned off (#34504) * Reload all inputs when only one changes. * Update changelog. * Fix stopping case. * Update CHANGELOG.next.asciidoc Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co> * Adjust test to catch bad case. --------- Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co>
What does this PR do?
Fixes an issue in the
managerV2
where it would not call reload with all inputs, resulting in inputs being turned off when they should stay running.Why is it important?
Fixes an issue where if one input changes it turns off all the other inputs.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues
NA
for Ubuntu agent on changing logging level todebug
. elastic-agent#2232