Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 3.7
Describe the issue:
I have two ISM policies. Initial policy takes care of the current live index and creates a restored index with remote*. The second policy is to delete the restored indices after the retention period. The initial policy gets attached automatically when the index gets created but the 2nd policy does not. The 2nd policy gets attached to the restored indices on a random basis.
I am attaching both policies here to see if there is an issue with how I have set it up
Configuration
Initial Policy
==============
{
"policy": {
"policy_id": "initial-hvuv-osdev-30m-ism-policy",
"description": "Hot 7d TO Warm 1m TO S3 Snapshot TO Delete at 15m",
"last_updated_time": 1781792440941,
"schema_version": 29,
"error_notification": {
"channel": {
"id": "L_3gbp4BMN_ORf_TcVFV"
},
"message_template": {
"source": "ISM policy execution failed.\n\n==============\nPolicy: {{ctx.policy_id}}\nIndex: {{ctx.index}}\nState: {{ctx.state.name}}\nAction: {{ctx.action.name}}\nReason: {{ctx.info.message}}\n==============",
"lang": "mustache"
}
},
"default_state": "hot",
"states": [
{
"name": "hot",
"actions": [
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"index_priority": {
"priority": 100
}
},
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"rollover": {
"min_doc_count": 200000000,
"min_index_age": "7d",
"min_primary_shard_size": "50gb",
"copy_alias": false
}
},
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"force_merge": {
"max_num_segments": 1
}
}
],
"transitions": [
{
"state_name": "searchable_snapshot",
"conditions": {
"min_index_age": "30s"
}
}
]
},
{
"name": "searchable_snapshot",
"actions": [
{
"retry": {
"count": 2,
"backoff": "exponential",
"delay": "1m"
},
"replica_count": {
"number_of_replicas": 0
}
},
{
"retry": {
"count": 1,
"backoff": "exponential",
"delay": "1m"
},
"snapshot": {
"repository": "osdev-hvuv-ism",
"snapshot": "osdev-14d-ism-{{ctx.index}}"
}
},
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"convert_index_to_remote": {
"repository": "osdev-hvuv-ism",
"snapshot": "osdev-14d-ism-{{ctx.index}}",
"include_aliases": true,
"ignore_index_settings": "",
"delete_original_index": true,
"rename_pattern": "remote_$1"
}
}
],
"transitions": []
}
],
"ism_template": [
{
"index_patterns": [
"logs-*"
],
"priority": 400,
"last_updated_time": 1781792440941
}
]
}
}
Delete Policy
============
{
"id": "vz-tsgi-hvuv-osdev-cleanup-14d-ism-policy",
"seqNo": 3352737,
"primaryTerm": 14,
"policy": {
"policy_id": "osdev-cleanup-14d-ism-policy",
"description": "Policy to remove remote indices after 14 days",
"last_updated_time": 1781781641723,
"schema_version": 29,
"error_notification": {
"channel": {
"id": "L_3gbp4BMN_ORf_TcVFV"
},
"message_template": {
"source": "ISM policy execution failed.\n\n==============\nPolicy: {{ctx.policy_id}}\nIndex: {{ctx.index}}\nState: {{ctx.state.name}}\nAction: {{ctx.action.name}}\nReason: {{ctx.info.message}}\n==============",
"lang": "mustache"
}
},
"default_state": "intial_state",
"states": [
{
"name": "intial_state",
"actions": [],
"transitions": [
{
"state_name": "delete",
"conditions": {
"min_rollover_age": "7d"
}
}
]
},
{
"name": "delete",
"actions": [
{
"retry": {
"count": 3,
"backoff": "exponential",
"delay": "1m"
},
"delete": {}
}
],
"transitions": []
}
],
"ism_template": [
{
"index_patterns": [
"remote_*"
],
"priority": 450,
"last_updated_time": 1781781641723
}
]
}
}
Relevant Logs or Screenshots: Not applicable.