Cherry-pick #24055 to 7.11: Fix reloading of log level for services #24062
Merged
michalpristas merged 1 commit intoelastic:7.11from Feb 16, 2021
Merged
Cherry-pick #24055 to 7.11: Fix reloading of log level for services #24062michalpristas merged 1 commit intoelastic:7.11from
michalpristas merged 1 commit intoelastic:7.11from
Conversation
…24055) [Ingest Management] Fix reloading of log level for services (elastic#24055)
Contributor
|
Pinging @elastic/agent (Team:Agent) |
Contributor
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of PR #24055 to 7.11 branch. Original message:
What does this PR do?
This PR fixes 2 things.
First one is an issue introduced in #23886, this caused that
VarSkipKeyremoved key from Action which was then stored using Ack and Store. This action wasinput-less so after restart agent was not running anything and it thought it;s ok because preserved state id is same as the one from fleet.This one I discovered without filing an issue
Second one is bug described in #23720. The issue here is that agent creates a server with own counter, set to 1. But service already has a config with state counter. So if we change log level and restart an agent counter is 1 which == to the counter in a service and agent thinks everything is up to date.
Fix is that we take counter from a service and if it's > 0, which means services already retrieved some configuration we force reload of config by incrementing our local counter to
what_service_has + 1Why is it important?
Fixes bugs
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.