Troubleshoot incomplete migration to data tiers
Stack
Elasticsearch standardized the implementation of hot-warm-cold architectures to data tiers in version 7.10. Some indices and deployments might have not fully transitioned to data tiers and mix the new way of implementing the hot-warm-cold architecture with legacy based node attributes.
This could lead to unassigned shards or shards not transitioning to the desired tier.
To fix this issue, use the following steps.
You can run the following steps using either API console, or direct Elasticsearch API calls.
To learn how to assign tiers to your data nodes, refer to Migrate index allocation filters to ILM node roles.
To get the shards assigned, call the migrate to data tiers routing API, which resolves the conflicting routing configurations to using the standardized data tiers. This also future-proofs the system by migrating the index templates and ILM policies if needed.
Stop index lifecycle management
POST /_ilm/stopThe response will look like this:
{ "acknowledged": true }Wait for index lifecycle management to stop. Check the status until it returns
STOPPEDas follows:GET /_ilm/statusWhen index lifecycle management has successfully stopped the response will look like this:
{ "operation_mode": "STOPPED" }-
POST /_ilm/migrate_to_data_tiersThe response will look like this:
{ "dry_run": false, "migrated_ilm_policies":["policy_with_allocate_action"], "migrated_indices":["warm-index-to-migrate-000001"], "migrated_legacy_templates":["a-legacy-template"], "migrated_composable_templates":["a-composable-template"], "migrated_component_templates":["a-component-template"] }- The ILM policies that were updated.
- The indices that were migrated to tier preference routing.
- The legacy index templates that were updated to not contain custom routing settings for the provided data attribute.
- The composable index templates that were updated to not contain custom routing settings for the provided data attribute.
- The component templates that were updated to not contain custom routing settings for the provided data attribute.
Restart index lifecycle management:
POST /_ilm/startThe response will look like this:
{ "acknowledged": true }