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 will fail to completely stop if any indices are configured with an ILM policy that does not exist #40824

Closed
gwbrown opened this issue Apr 3, 2019 · 1 comment · Fixed by #40820
Labels
>bug :Data Management/ILM+SLM Index and Snapshot lifecycle management

Comments

@gwbrown
Copy link
Contributor

gwbrown commented Apr 3, 2019

Elasticsearch version (bin/elasticsearch --version): 6.7.1 and earlier

Description of the problem including expected versus actual behavior:
If any index uses a lifecycle policy which has a index.lifecycle.name set which refers to an ILM policy that does not exist, when ILM is stopped, the value returned by GET _ilm/status will remain as STOPPING and never transition to STOPPED.

It should rapidly transition to STOPPED as soon as no indices are in the middle of a Shrink action.

Notably, ILM activity does mostly stop: While the ILM status STOPPING, only Shrink actions will be run, so this is primarily an issue with the ILM Status API.

Steps to reproduce: Create an index with index.lifecycle.name set to an ILM policy that does not exist and call the ILM Stop API.

PUT testindex
{
  "settings": {
    "index.number_of_shards": 3,
    "index.lifecycle.name": "this_policy_doesnt_exist"
  }
}

POST _ilm/stop

GET _ilm/status

Provide logs (if relevant):
Log messages similar to:

policy [this_policy_doesnt_exist] for index [testindex] does not exist, recording this in step_info for this index

Will appear in the logs. This is expected when an index is set to use a policy that does not exist as well, but it may help to identify the issue.

Workaround: If the policies that don't exist are removed from all indices referencing them using the Remove Policy API, then the ILM status will rapidly transition to STOPPED as expected.

@gwbrown gwbrown added >bug :Data Management/ILM+SLM Index and Snapshot lifecycle management labels Apr 3, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants