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

Handle failure to retrieve ILM policy step better #49193

Merged
merged 1 commit into from
Nov 19, 2019

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Nov 15, 2019

This commit wraps the calls to retrieve the current step in a try/catch
so that the exception does not bubble up. Instead, step info is added
containing the exception to the existing step.

Semi-related to #49128

This commit wraps the calls to retrieve the current step in a try/catch
so that the exception does not bubble up. Instead, step info is added
containing the exception to the existing step.

Semi-related to #49128
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/ILM+SLM)

Copy link
Contributor

@andreidan andreidan left a comment

Choose a reason for hiding this comment

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

I think this generally looks good, but I am wondering if we need a special error handling in this particular case (policy missing/invalid step) or if we should instead use our existing execution halting and error reporting mechanism and move the lifecycle state into the ERROR step (ie. moveToErrorStep) ? A note on this is that these are the cases where the policy does exist. The case where it does not is handled separately by updating just the step info. @gwbrown what do you think?

@dakrone
Copy link
Member Author

dakrone commented Nov 18, 2019 via email

Copy link
Contributor

@andreidan andreidan left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@gwbrown gwbrown left a comment

Choose a reason for hiding this comment

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

LGTM as well. I would like it if we could signal the error the same way as other policy errors as well, but I'm in favor of more visibility here as an improvement over the current situation since that's nontrivial.

@andreidan andreidan merged commit 72530f8 into master Nov 19, 2019
@andreidan
Copy link
Contributor

We will not backport this to 7.4 as a 7.5 release is imminent and there'll likely be no more 7.4.x releases

andreidan pushed a commit to andreidan/elasticsearch that referenced this pull request Nov 19, 2019
This commit wraps the calls to retrieve the current step in a try/catch
so that the exception does not bubble up. Instead, step info is added
containing the exception to the existing step.

Semi-related to elastic#49128

(cherry picked from commit 72530f8)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
andreidan pushed a commit to andreidan/elasticsearch that referenced this pull request Nov 19, 2019
This commit wraps the calls to retrieve the current step in a try/catch
so that the exception does not bubble up. Instead, step info is added
containing the exception to the existing step.

Semi-related to elastic#49128

(cherry picked from commit 72530f8)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
andreidan added a commit that referenced this pull request Nov 19, 2019
This commit wraps the calls to retrieve the current step in a try/catch
so that the exception does not bubble up. Instead, step info is added
containing the exception to the existing step.

Semi-related to #49128

(cherry picked from commit 72530f8)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
andreidan added a commit that referenced this pull request Nov 19, 2019
This commit wraps the calls to retrieve the current step in a try/catch
so that the exception does not bubble up. Instead, step info is added
containing the exception to the existing step.

Semi-related to #49128

(cherry picked from commit 72530f8)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
@colings86 colings86 deleted the ilm-mark-failure-to-retrieve-step branch May 27, 2020 07:39
@jakelandis jakelandis removed the v8.0.0 label Jul 26, 2021
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.

5 participants