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

[7.17] Allow ILM to transition to implicit cached steps (#91779) #94766

Conversation

andreidan
Copy link
Contributor

@andreidan andreidan commented Mar 27, 2023

ILM tries to honour the cached phase however, some steps are implicit
(e.g. injected actions or the terminal policy/phase step)
Currently, ILM would throw an exception if the currently cached phase was removed:

step [{"phase":"warm","action":"complete","name":"complete"}] for index [index]
with policy [my-policy] does not exist

ILM would currently also throw an exception if the next step was an
implicit one and the phase was removed from the underlying policy e.g. if the
index is on the migrate step and looking to transition to the
check-migration step, whilt the warm phase doesn't exist in the
policy anymore

step [{"phase":"warm","action":"migrate","name":"check-migration"}] for index
[index] with policy [my-policy] does not exist

This fixes these scenarios by enhancing the
PolicyStepsRegistry#parseStepKeysFromPhase method to compute all the
steps in the phase (including all implicit steps)

Backport of #91779

ILM tries to honour the cached phase however, some steps are implicit
(e.g. injected actions or the terminal policy/phase step)
Currently, ILM would throw an exception if the currently cached phase was removed:
```
step [{"phase":"warm","action":"complete","name":"complete"}] for index [index]
with policy [my-policy] does not exist
```
ILM would currently also throw an exception if the next step was an
implicit one and the phase was removed from the underlying policy e.g. if the
index is on the `migrate` step and looking to transition to the
`check-migration` step, whilt the `warm` phase doesn't exist in the
policy anymore
```
step [{"phase":"warm","action":"migrate","name":"check-migration"}] for index
[index] with policy [my-policy] does not exist
```

This fixes these scenarios by enhancing the
`PolicyStepsRegistry#parseStepKeysFromPhase` method to compute all the
steps in the phase (including all implicit steps)

(cherry picked from commit dc726e6)
Signed-off-by: Andrei Dan <[email protected]>
@andreidan andreidan added :Data Management/ILM+SLM Index and Snapshot lifecycle management backport v7.17.10 labels Mar 27, 2023
@andreidan andreidan changed the title [7.17] Allow ILM to transition to implicit cached steps [7.17] Allow ILM to transition to implicit cached steps (#91779) Mar 27, 2023
@andreidan andreidan merged commit 45e5853 into elastic:7.17 Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Data Management/ILM+SLM Index and Snapshot lifecycle management v7.17.10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant