ILM Delete Phase not working

Hi All,
I have defined an ILM policy with hot, warm and delete phase.
Hot are warm phase are working as expected, but in spite of the delete phase says "complete", the index is still there...
Am I misunderstanding something?
Any help will be appreciated

Thank you!
Regards
Ana


ILM Policy
    PUT _ilm/policy/fortitraffic
    {
      "policy": {
        "phases": {
          "hot": {
            "min_age": "0ms",
            "actions": {
              "rollover": {
                "max_size": "49gb",
                "max_age": "36h"
              },
              "set_priority": {
                "priority": 100
              }
            }
          },
          "warm": {
            "min_age": "12h",
            "actions": {
              "allocate": {
                "include": {},
                "exclude": {},
                "require": {
                  "data": "warm"
                }
              },
              "readonly": {}
            }
          },
          "delete": {
            "min_age": "10d",
            "actions": {}
          }
        }
      }
    }

GET forti-traffic-2020.11.28-000010/_ilm/explain
{
  "indices" : {
    "forti-traffic-2020.11.28-000010" : {
      "index" : "forti-traffic-2020.11.28-000010",
      "managed" : true,
      "policy" : "fortitraffic",
      "lifecycle_date_millis" : 1606727187230,
      "age" : "14.03d",
      "phase" : "delete",
      "phase_time_millis" : 1607591787157,
      "action" : "complete",
      "action_time_millis" : 1606814833511,
      "step" : "complete",
      "step_time_millis" : 1607591787157,
      "phase_execution" : {
        "policy" : "fortitraffic",
        "phase_definition" : {
          "min_age" : "10d",
          "actions" : { }
        },
        "version" : 14,
        "modified_date_in_millis" : 1607940141265
      }
    }
  }
}

I believe you need to add a delete action to the delete phase.

2 Likes

Thank you Christian, I though that the action in the delete phase was implicit.
I'll add and action and see what is happening
Regards

I did modify ILM policy by API (there is not possible from the UI, this is why I thought that the action of deletion was implicit) and now is like this.
I think now It will work
Thank you!

PUT _ilm/policy/fortitraffic
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_size": "49gb",
            "max_age": "36h"
          },
          "set_priority": {
            "priority": 100
          }
        }
      },
      "warm": {
        "min_age": "12h",
        "actions": {
          "allocate": {
            "include": {},
            "exclude": {},
            "require": {
              "data": "warm"
            }
          },
          "readonly": {}
        }
      },
      "delete": {
        "min_age": "10d",
        "actions": {
          "delete": {
            "delete_searchable_snapshot": true
          }
        }
      }
    }
  }
}
1 Like

This is related to this issue, UI allow adding delete phase without action

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.