Versions OpenSearch & Dashboard 2.13.0
Describe the issue: ISM is working with the first rollover step. It does not PERFORM THE DELETE STEP.
Configuration:
Below are the configuration details of ISM and related objects. ISM along with index template and alias, intentionally with lower thresholds on min_doc_count to see the effects.
PUT _plugins/_ism/policies/cm_logs_00000000001_ism
{
"policy": {
"policy_id": "cm_logs_00000000001_ism",
"description": "ISM for Cloud Monitor logs",
"error_notification": null,
"default_state": "hot",
"states": [
{
"name": "hot",
"actions": [
{
"timeout": "30m",
"retry": {
"count": 5,
"backoff": "exponential",
"delay": "30m"
},
"rollover": {
"min_size": "60gb",
"min_doc_count": 1,
"min_index_age": "30m",
"min_primary_shard_size": "30gb",
"copy_alias": true
}
}
],
"transitions": [
{
"state_name": "warm_7_days",
"conditions": {
"min_index_age": "30m"
}
}
]
},
{
"name": "warm_7_days",
"actions": [
{
"timeout": "30m",
"retry": {
"count": 5,
"backoff": "exponential",
"delay": "30m"
},
"delete": {}
}
],
"transitions": []
}
],
"ism_template": [
{
"index_patterns": ["cm_logs_00000000001*"],
"priority": 101
}
]
}
}
CREATE TEMPLATE
PUT _index_template/cm_logs_00000000001_tmplt
{
"index_patterns": ["cm_logs_00000000001-*"],
"template": {
"settings": {
"index": {
"number_of_shards": "1",
"number_of_replicas": "1",
"refresh_interval": "30s",
"sort.field": "@timestamp",
"sort.order": "desc",
"plugins.index_state_management.rollover_alias": "cm_logs_00000000001_wrt_als"
}
},
"mappings": {
"dynamic_templates": [
{
"strings": {
"match_mapping_type": "string",
"mapping": {
"type": "keyword"
}
}
}
],
"properties": {
"@timestamp": {"type": "date"},
"log": {"type": "text"},
"CloudAccountID": {"type": "keyword"}
}
}
},
"composed_of": [],
"priority": 201,
"_meta": {
"flow": "simple"
}
}
CREATE INDEX
PUT cm_logs_00000000001-000001
{
"settings": {
"index": {
"plugins.index_state_management.rollover_alias": "cm_logs_00000000001_wrt_als"
}
}
}
CREATE ALIAS
POST _aliases
{"actions": [{"add": {"index": "cm_logs_00000000001-*","alias": "cm_logs_00000000001_wrt_als","is_write_index":true}}]}
POST cm_logs_00000000001_wrt_als/_doc
{"message": "00000000001"}
GET cm_logs_00000000001-*/_refresh
GET cm_logs_00000000001-*/_count
VERIFY
GET _plugins/_ism/explain/cm_logs_00000000001-000001
{
"cm_logs_00000000001-000001": {
"index.plugins.index_state_management.policy_id": "cm_logs_00000000001_ism",
"index.opendistro.index_state_management.policy_id": "cm_logs_00000000001_ism",
"index": "cm_logs_00000000001-000001",
"index_uuid": "BDgOrSzfTq6kjlh5NgTMPA",
"policy_id": "cm_logs_00000000001_ism",
"policy_seq_no": 219607,
"policy_primary_term": 22,
"rolled_over": false,
"rolled_over_index_name": "cm_logs_00000000001-000002",
"index_creation_date": 1727865589956,
"state": {
"name": "hot",
"start_time": 1727866033244
},
"action": {
"name": "rollover",
"start_time": 1727866192573,
"index": 0,
"failed": true,
"consumed_retries": 1,
"last_retry_time": 1727867481593
},
"step": {
"name": "attempt_rollover",
"start_time": 1727866192573,
"step_status": "failed"
},
"retry_info": {
"failed": false,
"consumed_retries": 0
},
"info": {
"message": "Action timed out"
},
"enabled": false
},
"total_managed_indices": 1
}
Relevant Logs or Screenshots:
Deletion not occurred.
index status
cm_logs_00000000001-000001 open
cm_logs_00000000001-000002 open
cm_logs_00000000001-000003 open
cm_logs_00000000001-000004 open
cm_logs_00000000001-000005 open
cm_logs_00000000001-000006 open
cm_logs_00000000001-000007 open