Skip to content
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] Improve messaging on error due to inline scripts being disabled #49860

Merged

Conversation

gmmorris
Copy link
Contributor

@gmmorris gmmorris commented Oct 31, 2019

addresses #49853, but doesn't resolve it completely as further mitigation may very likely be required.

Summary

This PR detects when claiming tasks fails due to inline scripts being disabled in Elasticsearch and improves the message reported in the Kibana log.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@gmmorris gmmorris requested a review from a team October 31, 2019 13:56
@gmmorris gmmorris self-assigned this Oct 31, 2019
@gmmorris gmmorris added Feature:Task Manager release_note:skip Skip the PR/issue when compiling release notes Team:Stack Services labels Oct 31, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-services (Team:Stack Services)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@pmuellr pmuellr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; made some comments, think it is good for 7.5, maybe a bit log spammy, assuming that sort of thing would get fixed in a later release.

return docs;
} catch (ex) {
if (identifyEsError(ex).includes('cannot execute [inline] scripts')) {
logger.warn(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we end up seeing this message over and over? Seems like since it only logs a warning in this case, and then ends up returning [], we'll see this every interval. Should it set some state variable somewhere to indicate "it's never going to work" so we just don't ever try? I guess that doesn't make sense, if they fix ES and start again with Kibana still running. hmmm ...

I guess I woulda expected it to still throw after writing the message, rather than soldier on and return []. Perhaps that a bit fatal-y and we don't want that either?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will appear on every poll, but throwing won't prevent that.
My thinking is that throwing will result in polluting the log with both the messaging and the error... feels better to just message what the issue is, no?

As for a global state thing... like you said, it could cause other issues such as ES being sorted but Kibana thinking it can't use TM.

Copy link
Contributor

@mikecote mikecote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, seems in line with what others are doing.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@gmmorris gmmorris merged commit 128948c into elastic:master Nov 1, 2019
gmmorris added a commit to gmmorris/kibana that referenced this pull request Nov 1, 2019
…ng disabled (elastic#49860)

This PR detects when claiming tasks fails due to inline scripts being disabled in Elasticsearch and improves the message reported in the Kibana log.
gmmorris added a commit to gmmorris/kibana that referenced this pull request Nov 1, 2019
…ng disabled (elastic#49860)

This PR detects when claiming tasks fails due to inline scripts being disabled in Elasticsearch and improves the message reported in the Kibana log.
gmmorris added a commit that referenced this pull request Nov 1, 2019
…ng disabled (#49860) (#49956)

This PR detects when claiming tasks fails due to inline scripts being disabled in Elasticsearch and improves the message reported in the Kibana log.
gmmorris added a commit that referenced this pull request Nov 1, 2019
…ng disabled (#49860) (#49951)

This PR detects when claiming tasks fails due to inline scripts being disabled in Elasticsearch and improves the message reported in the Kibana log.
@gmmorris gmmorris deleted the task-manager/fix-disabled-inline-scripts branch November 21, 2019 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants