Skip to content

Handle failure to retrieve ILM policy step better#49193

Merged
andreidan merged 1 commit intomasterfrom
ilm-mark-failure-to-retrieve-step
Nov 19, 2019
Merged

Handle failure to retrieve ILM policy step better#49193
andreidan merged 1 commit intomasterfrom
ilm-mark-failure-to-retrieve-step

Conversation

@dakrone
Copy link
Copy Markdown
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
@dakrone dakrone added >bug :Data Management/ILM+SLM DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. v8.0.0 v7.6.0 v7.4.3 v7.5.1 labels Nov 15, 2019
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
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
Copy Markdown
Member Author

dakrone commented Nov 18, 2019 via email

Copy link
Copy Markdown
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
Copy Markdown
Contributor

@AthenaEryma AthenaEryma 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
Copy Markdown
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

>bug :Data Management/ILM+SLM DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. v7.5.1 v7.6.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants