Hi.
I have a problem with automatic policy enforcement:
If create a new policy specifying “ism_template”
{
“policy”: {
“policy_id”: “autodel_7days”,
“description”: “delete index after 7 days”,
“default_state”: “norm”,
“states”: [
{
“name”: “norm”,
“actions”: ,
“transitions”: [
{
“state_name”: “del”,
“conditions”: {
“min_index_age”: “7d”
}
}
]
},
{
“name”: “del”,
“actions”: [
{
“delete”: {}
}
],
“transitions”:
}
],
“ism_template”: {
“index_patterns”: [
“testindex*”
],
“priority”: 50
}
}
}
after creating a new index, the policy is not applied:
PUT testindex1
GET _opendistro/_ism/explain/testindex1
{
“testindex1”: {
“index.opendistro.index_state_management.policy_id”: null
}
}
at the same time everything works as it should on the test cluster.
production cluster contains 19 policies that are applied to 4000 indexes. 2 weeks ago, after the transition to 1.13.1, all policies were updated and for a while they were assigned normally. but now only old policies (created 2 weeks ago) are assigned, all newly created policies behave as in the example above.
as if they do not perceive the “ism_template” block.
Any ideas what could have gone wrong?
for templates “_simulate_index” (POST _index_template/_simulate_index/testindex) allows you to check which template will be assigned to the new index, maybe there is a similar command for checking the policy?