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

Migrate to data tiers API can configure data_content/data_hot for partially mounted indices #97898

Closed
andreidan opened this issue Jul 24, 2023 · 1 comment · Fixed by #97936
Closed
Assignees
Labels
>bug :Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team v7.17.13 v8.9.1 v8.10.0

Comments

@andreidan
Copy link
Contributor

Elasticsearch Version

7.17, 8.x

Installed Plugins

No response

Java Version

bundled

OS Version

Darwin

Problem Description

The migrate to data tiers API can sometimes configure an illegal value for the _tier_preference setting for partially mounted indices.
This can happen if two conditions are met:

  1. if the partially mounted index doesn't have a _tier_preference configured
  2. if the migrate to data tiers API doesn't perform any migration for this index (e.g. say this partially mounted index doesn't use the data custom attribute name for any allocation filtering, but either uses some other node attribute name or none at all)

In this case this piece of code kicks in to configure a default tier preference https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/cluster/metadata/MetadataMigrateToDataTiersRoutingService.java#L534

This is wrong, and we should configure the MountSearchableSnapshotRequest.Storage.defaultDataTiersPreference as the tier preference.

Relates to #84758

Steps to Reproduce

  1. Mount an index - partial-test
  2. Remove the _tier_preference using
PUT partial-test/_settings
{
  "index.routing.allocation.include._tier_preference": null
}
  1. Call the migrate to data tiers routing API
POST /_ilm/migrate_to_data_tiers

Logs (if relevant)

No response

@andreidan andreidan self-assigned this Jul 24, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Jul 24, 2023
@elasticsearchmachine
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team v7.17.13 v8.9.1 v8.10.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants