I am running a simple setup with ILM and small index. ILM should delete the index but instead its stuck at "step": "check-rollover-ready",
here is my script to recreate the index
#!/bin/bash
echo -e "\n update settings"
curl -s -XPUT localhost:9200/_cluster/settings -H"content-type: application/json" -d'
{
"persistent": {
"indices.lifecycle.poll_interval": "1s",
"logger.org.elasticsearch.xpack.ilm": "TRACE"
}
}
'
echo -e "\nadd index template"
curl -s -XPUT localhost:9200/_template/devtest -H"content-type: application/json" -d'
{
"index_patterns": [
"devtest-*"
],
"settings": {
"index": {
"lifecycle": {
"name": "devtest",
"rollover_alias": "devtest"
},
"number_of_shards": "1",
"number_of_replicas": "0"
}
}
}
'
echo -e "\nadd policy version 1"
curl -s -XPUT -H"content-type: application/json" localhost:9200/_ilm/policy/devtest -d'
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_size": "50mb",
"max_age": "2m"
}
}
},
"delete": {
"min_age": "2m",
"actions": {
"delete": {}
}
}
}
}
}
'
echo -e "\ncreating index devtest"
curl -s -XPUT -H"content-type: application/json" localhost:9200/devtest-000001 -d'
{
"aliases": {
"devtest": {
"is_write_index": true
}
}
}
'
This is the result after waiting a few minutes:
# curl -s localhost:9200/devtest/_ilm/explain | jq .
{
"indices": {
"devtest-000001": {
"index": "devtest-000001",
"managed": true,
"policy": "devtest",
"index_creation_date_millis": 1688070066041,
"time_since_index_creation": "14.44m",
"lifecycle_date_millis": 1688070066041,
"age": "14.44m",
"phase": "hot",
"phase_time_millis": 1688070125507,
"action": "rollover",
"action_time_millis": 1688070139520,
"step": "check-rollover-ready",
"step_time_millis": 1688070139520,
"phase_execution": {
"policy": "devtest",
"phase_definition": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_size": "50mb",
"max_age": "2m"
}
}
},
"version": 1,
"modified_date_in_millis": 1688070043004
}
}
}
}
curl -s localhost:9200 | jq .version.number
"8.6.2"
Please advise , Thank you