-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Ingest Manager] Internal action for policy reassign #78493
Conversation
@jen-huang what do you think of this approach? I am considering moving forward with that and adding this for bulk actions if it sounds good to you? |
@nchaulet I am in favor of this approach, I spent some time thinking about about alternatives but couldn't think of anything better that wouldn't require major restructuring. I think it would be good to add some code comments here to say that |
Pinging @elastic/ingest-management (Team:Ingest Management) |
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.
Tested locally with latest 7.10 snapshot of agent, policy reassignment got picked up super fast and regular policy change worked like normal. Code LGTM 👍
One thing I noticed in my testing is that unenrollment still takes a long time to be acknowledged. I wonder if it is possible to use the same kind of |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Yes the force unenroll will benefits to use the same pattern, I will try to get another PR for that or at least an issue |
…into feature/task_manager_429 * 'feature/task_manager_429' of github.com:elastic/kibana: (158 commits) Add license check to direct package upload handler. (#79653) [Ingest Manager] Rename API /api/ingest_manager => /api/fleet (#79193) [Security Solution][Resolver] Simplify CopyableField styling and add comments (#79594) Fine-tunes ML related text on Metrics UI (#79425) [ML] DF Analytics creation wizard: ensure job creation possible when model memory lower than estimate (#79229) Add new "Add Data" tutorials (#77237) Update APM telemetry docs (#79583) Revert "Add support for runtime field types to mappings editor. (#77420)" (#79611) Kibana request headers (#79218) ensure missing indexPattern error is bubbled up to error callout (#79378) Missing space fix (#79585) remove duplicate tab states (#79501) [data.ui] Lazy load UI components in data plugin. (#78889) Add generic type params to search dependency. (#79608) [Ingest Manager] Internal action for policy reassign (#78493) [ILM] Add index_codec to forcemerge action in hot and warm phases (#78175) [Ingest Manager] Update open API spec and add condition to agent upgrade endpoint (#79579) [ML] Hide Data Grid column options when histogram charts are enabled. (#79459) [Telemetry] Synchronous `setup` and `start` methods (#79457) [Observability] Persist time range across apps (#79258) ...
Summary
Resolves #77613
When we introduced long polling for agent checkin, we introduced a bug for policy reassignment.
Agent policy reassignment is triggered by removing the field
policy_revision
and updating the fieldpolicy_id
on the agent, so during the next checkin we will send a newPOLICY_CHANGE
action that the agent will use.With long polling the agent is going to wait until the long polling timeout duration to do a new checkin, this cause policy reassign to be extremely long.
I think we can fix that by introducing new kind of actions
INTERNAL_*
andINTERNAL_POLICY_REASSIGN
.When we reassign an agent we can create a new action
INTERNAL_POLICY_REASSIGN
that will be get during the long polling (we check for new agent actions every 3 seconds) and we can use that action to refresh the agent and distribute thePOLICY_CHANGE
action.Not sure it's the best solution to that problem.
In progress