Indices not being deleted in ILM policy

For some reason, my indices are not being deleted after the delete phase is triggered.

I have a policy as below:

{
  "unifi" : {
    "version" : 1,
    "modified_date" : "2021-01-28T14:21:47.860Z",
    "policy" : {
      "phases" : {
        "hot" : {
          "min_age" : "0ms",
          "actions" : {
            "set_priority" : {
              "priority" : 100
            }
          }
        },
        "delete" : {
          "min_age" : "2d",
          "actions" : { }
        },
        "warm" : {
          "min_age" : "1d",
          "actions" : {
            "forcemerge" : {
              "max_num_segments" : 1,
              "index_codec" : "best_compression"
            },
            "set_priority" : {
              "priority" : 50
            },
            "shrink" : {
              "number_of_shards" : 1
            }
          }
        }
      }
    }
  }
}

When an index reaches the 2d since index creation, I can see it running through the delete phase and it shows as complete but it doesn't get removed.

When I do an _ilm/explain on the index, it shows as follows:

{
  "indices" : {
    "logstash-unifi-2021.02.03" : {
      "index" : "logstash-unifi-2021.02.03",
      "managed" : true,
      "policy" : "unifi",
      "lifecycle_date" : "2021-02-03T00:00:00.351Z",
      "lifecycle_date_millis" : 1612310400351,
      "age" : "3.41d",
      "phase" : "delete",
      "phase_time" : "2021-02-05T00:00:40.709Z",
      "phase_time_millis" : 1612483240709,
      "action" : "complete",
      "action_time" : "2021-02-04T00:16:19.792Z",
      "action_time_millis" : 1612397779792,
      "step" : "complete",
      "step_time" : "2021-02-05T00:00:40.709Z",
      "step_time_millis" : 1612483240709,
      "phase_execution" : {
        "policy" : "unifi",
        "phase_definition" : {
          "min_age" : "2d",
          "actions" : { }
        },
        "version" : 1,
        "modified_date" : "2021-01-28T14:21:47.860Z",
        "modified_date_in_millis" : 1611843707860
      }
    }
  }
}

Running version 7.10.2

Am I missing something?

Cheers,
Kev

according to the documents you are missing the actions?!

...
        "delete" : {
          "min_age" : "2d",
          "actions" : { 
              "delete" : { }
            }
        },
...
1 Like

Don't know why I never seen that.. thanks!

I created it from the Kibana UI which is why I thought it was all good so might have been a bug. I did create it in 7.10.1 and had upgraded so could have been fixed already.

Cheers again

Yeah, it was indeed a Kibana bug :slight_smile: