-
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
[Task Manager] Investigate better handling of unregistered task types #122389
Comments
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
It came up in planning that there is actually a potential bug here where disabling a task type can cause tasks of those type to become That makes this a higher impact issue than I originally realised. 👍 |
Upon further investigation, using |
Have we looked at using a One problem is that it won't be obvious why these tasks aren't running, when we look at task manager. But I think we'd be in a similar situation even if we used |
I've added this issue to To-Do because it affects our friends in reporting (#120995) and the impact can be pretty high if ever an alerting rule ends up in such state (mismatched Kibana versions, temporarily disabled plugin, future ERs that may touch this, etc.) |
Just added a reference to an SDH ^^^, with another interesting scenario. APM has it's own config to allow telemetry to be enabled for APM, which is by default true, but can be set to false. When set to false, the APM telemetry task will not be registered, and so presumably it will become unregistered if it did previously get registered. Looking at the flow, it doesn't appear there's anyway the task will ever escape "unregistered" status, even if the APM config turns true again. Relevant code starts here: kibana/x-pack/plugins/apm/server/plugin.ts Lines 81 to 94 in 775be29
Makes me wonder how many other task manager clients have similar "optional registration" capabilities. Seems like a problem area. Seems like you should never conditionally register tasks? |
We have a few options: Provide a way to explicitly de-register a task Claim Curious if @elastic/response-ops-execution has any thoughts? I'm inclined to go for explicit de-registration. |
I think the de-registration path makes sense to me too. That way, we can support cases like reporting where only dedicated Kibanas would claim tasks. Based on the original issue #84088, we should make sure we're not bringing back those problems as we change functionality 👍 |
In the future, if we need to go a step further, we could put a flag on the tasks that are sometimes unrecognized to help us know which tasks don't get claimed by Kibana when looking at the documents. We could keep the flagging process efficient by making Kibanas claim tasks where |
Currently it is possible for clustered Kibanas to get out of sync based on configuration and erroneously mark a task as “unrecognized”, causing it to never get claimed again. This can happen if a plugin is enabled in one Kibana node and disabled in another (like reporting). Currently, whichever Kibana is making its claim query will mark any task type that is not registered with it to be "unrecognized". This was done to explicitly identify task types that existed but were explicitly removed from Kibana. Any solution should ideally also allow actual deprecated task types to stop getting claimed.
Towards #119650
The text was updated successfully, but these errors were encountered: