-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
[ML] Better error when persistent task assignment disabled #52014
[ML] Better error when persistent task assignment disabled #52014
Conversation
Changes the misleading error message when attempting to open a job while the "cluster.persistent_tasks.allocation.enable" setting is set to "none" to a clearer message that names the setting. Closes elastic#51956
Pinging @elastic/ml-core (:ml) |
exception = makeNoSuitableNodesException(logger, params.getJobId(), assignment.getExplanation()); | ||
if (assignment.equals(AWAITING_UPGRADE)) { | ||
exception = makeCurrentlyBeingUpgradedException(logger, params.getJobId(), assignment.getExplanation()); | ||
} else if (assignment.getExplanation().contains("[" + EnableAssignmentDecider.ALLOCATION_NONE_EXPLANATION + "]")) { |
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.
It's not ideal that this is done using contains
. The better solution would be to make Assignment
s contain a reason number or enum value as well as a text reason. Then we could check that. But that's obviously a pretty far-reaching change. It may be worth waiting until there are more use cases for a reason code so that any implementation can take all the use cases into account.
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.
should work for the kibana UI as well.
Changes the misleading error message when attempting to open a job while the "cluster.persistent_tasks.allocation.enable" setting is set to "none" to a clearer message that names the setting. Closes #51956
Changes the misleading error message when attempting to open
a job while the "cluster.persistent_tasks.allocation.enable"
setting is set to "none" to a clearer message that names the
setting.
Closes #51956