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

[ILM] Fix the migrate to tiers service and migrate action tiers configuration #95934

Merged
merged 3 commits into from
May 9, 2023

Conversation

andreidan
Copy link
Contributor

@andreidan andreidan commented May 9, 2023

The migrate action (although no allowed in the frozen phase) would seem to convert frozen to data_frozen,data_cold,data_warm,data_hot tier configuration. As the migrate action is not allowed in the frozen phase this would never happen, however the code is confusing as it seems like it could.

The migrate to data tiers routing service shared the code used by the migrate action that converted frozen to data_frozen,data_cold,data_warm,data_hot if it would encounter an index without any _tier_preference setting
but with a custom node attribute configured to frozen e.g. include.data: frozen

As part of #84758 we have seen frozen indices with the data_frozen,data_cold,data_warm,data_hot tier preference however we could never reproduce it.

Relates to #84758

The migrate action (although no allowed in the frozen phase) would seem
to convert `frozen` to `data_frozen,data_cold,data_warm,data_hot` tier
configuration. As the migrate action is not allowed in the frozen phase
this would never happen, however the code is confusing as it seems like
it could.

The migrate to data tiers routing service shared the code that converted
`frozen` to `data_frozen,data_cold,data_warm,data_hot` if it would
encounter an index without any `_tier_preference` setting allocated on a
node with the `data_frozen` role (again a seemingly impossible situaion)

As part of elastic#84758 we have
seen frozen indices with the `data_frozen,data_cold,data_warm,data_hot`
tier preference however we could never reproduce it.
@andreidan andreidan requested a review from dakrone May 9, 2023 08:04
@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

Documentation preview:

@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label May 9, 2023
@elasticsearchmachine
Copy link
Collaborator

Hi @andreidan, I've created a changelog YAML for you.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@@ -148,7 +148,7 @@ public void testMigrateIlmPolicyForIndexWithoutILMMetadata() {
assertThat(migratedColdAllocateAction.getRequire().size(), is(0));
}

public void testMigrateIlmPolicyFOrPhaseWithDeactivatedMigrateAction() {
public void testMigrateIlmPolicyForPhaseWithDeactivatedMigrateAction() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Minor typo fix

@andreidan andreidan requested a review from gmarouli May 9, 2023 08:26
Copy link
Contributor

@gmarouli gmarouli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for fixing this @andreidan !

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

LGTM also, thanks Andrei!

@dakrone
Copy link
Member

dakrone commented May 9, 2023

@elasticmachine update branch

@dakrone dakrone added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) auto-backport-and-merge labels May 9, 2023
@elasticsearchmachine elasticsearchmachine merged commit f8b367d into elastic:main May 9, 2023
@andreidan andreidan deleted the tier-pref-frozen branch May 9, 2023 17:18
andreidan added a commit to andreidan/elasticsearch that referenced this pull request May 9, 2023
…guration (elastic#95934)

The migrate action (although no allowed in the frozen phase) would seem
to convert `frozen` to `data_frozen,data_cold,data_warm,data_hot` tier
configuration. As the migrate action is not allowed in the frozen phase
this would never happen, however the code is confusing as it seems like
it could.

The migrate to data tiers routing service shared the code used by the
`migrate` action that converted `frozen` to
`data_frozen,data_cold,data_warm,data_hot` if it would encounter an
index without any `_tier_preference` setting  but with a custom node
attribute configured to `frozen` e.g. `include.data: frozen`

As part of elastic#84758 we have
seen frozen indices with the `data_frozen,data_cold,data_warm,data_hot`
tier preference however we could never reproduce it.

Relates to elastic#84758
andreidan added a commit to andreidan/elasticsearch that referenced this pull request May 9, 2023
…guration (elastic#95934)

The migrate action (although no allowed in the frozen phase) would seem
to convert `frozen` to `data_frozen,data_cold,data_warm,data_hot` tier
configuration. As the migrate action is not allowed in the frozen phase
this would never happen, however the code is confusing as it seems like
it could.

The migrate to data tiers routing service shared the code used by the
`migrate` action that converted `frozen` to
`data_frozen,data_cold,data_warm,data_hot` if it would encounter an
index without any `_tier_preference` setting  but with a custom node
attribute configured to `frozen` e.g. `include.data: frozen`

As part of elastic#84758 we have
seen frozen indices with the `data_frozen,data_cold,data_warm,data_hot`
tier preference however we could never reproduce it.

Relates to elastic#84758
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.8
7.17

elasticsearchmachine pushed a commit that referenced this pull request May 9, 2023
…guration (#95934) (#95965)

The migrate action (although no allowed in the frozen phase) would seem
to convert `frozen` to `data_frozen,data_cold,data_warm,data_hot` tier
configuration. As the migrate action is not allowed in the frozen phase
this would never happen, however the code is confusing as it seems like
it could.

The migrate to data tiers routing service shared the code used by the
`migrate` action that converted `frozen` to
`data_frozen,data_cold,data_warm,data_hot` if it would encounter an
index without any `_tier_preference` setting  but with a custom node
attribute configured to `frozen` e.g. `include.data: frozen`

As part of #84758 we have
seen frozen indices with the `data_frozen,data_cold,data_warm,data_hot`
tier preference however we could never reproduce it.

Relates to #84758
elasticsearchmachine pushed a commit that referenced this pull request May 9, 2023
…guration (#95934) (#95966)

The migrate action (although no allowed in the frozen phase) would seem
to convert `frozen` to `data_frozen,data_cold,data_warm,data_hot` tier
configuration. As the migrate action is not allowed in the frozen phase
this would never happen, however the code is confusing as it seems like
it could.

The migrate to data tiers routing service shared the code used by the
`migrate` action that converted `frozen` to
`data_frozen,data_cold,data_warm,data_hot` if it would encounter an
index without any `_tier_preference` setting  but with a custom node
attribute configured to `frozen` e.g. `include.data: frozen`

As part of #84758 we have
seen frozen indices with the `data_frozen,data_cold,data_warm,data_hot`
tier preference however we could never reproduce it.

Relates to #84758
@gmarouli gmarouli removed the v8.8.1 label May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) >bug :Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team v7.17.11 v8.8.0 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants