ILM shrink adds random uuid but no aliases created

elasticsearch version 7.17

since upgrading from 7.6.2. to 7.17.x, i noticed ilm adds a random uuid to the shrunk index name. looks like this feature was added in 7.13 (see here).

my ilm policy was set up again right after upgrading from elasticsearch 7.6.2 to 7.17 (not sure if it overrides or no-op).

when the latest hot index shrunk, i do not see shrink-<random-uuid>-apm-index-019364 when hitting _cat/aliases:

$ curl -s -k -u <USERNAME>:<PASSWORD> https://elastic-stack-master:9200/_cat/aliases | grep 019364
alias                       index

but i was expecting something like shrink-<random-uuid>-<original-index-name>:

alias                       index
apm-index-019364            shrink-31g6-apm-index-019364
or
apm-index                   shrink-31g6-apm-index-019364

when i hit _cat/indices, I do see:

health  status  index
green   open    apm-index-019364
green   open    shrink-31g6-apm-index-019364

so i know that it shrunk via ilm but ilm does not set up the alias nor delete the original index here.

when i run _ilm/policy, i do see the most recently shrunk index ending in 019364:

  "apm-ilm" : {
    "version" : 1106,
    "modified_date" : "2022-10-12T18:11:09.846Z",
    "policy" : {
      "phases" : {
        "hot" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_size" : "7gb",
              "max_age" : "1d"
            },
            "set_priority" : {
              "priority" : 100
            }
          }
        },
        "delete" : {
          "min_age" : "14d",
          "actions" : {
            "delete" : {
              "delete_searchable_snapshot" : true
            }
          }
        },
        "warm" : {
          "min_age" : "0ms",
          "actions" : {
            "allocate" : {
              "number_of_replicas" : 1,
              "include" : { },
              "exclude" : { },
              "require" : { }
            },
            "set_priority" : {
              "priority" : 50
            },
            "shrink" : {
              "number_of_shards" : 2
            }
          }
        }
      }
    },
    "in_use_by" : {
      "indices" : [
        "shrink-s0bb-apm-index-018842",
        "shrink-jt5x-apm-index-018944",
        "shrink-r4pi-apm-index-019128",
        "shrink-r4pi-apm-index-019364",
        ...and hundreds more

this has caused Kibana APM to not display data from these indices since none of these indices were aliased to apm-index and i had to add shrink-* indices to the list of indices Kibana looks at for APM data.

I see here that es should automatically alias the new shrunk index with the random uuid. what am i missing?

EDIT: i had initially mentioned that the ilm policy was set up while running 7.6.2. while true, i realized when upgrading to 7.17, es did a rolling update and the kubernetes cronjob to set up the ilm policy was rerun in 7.17 at start up via helm post-install|upgrade hooks. Again, I am uncertain if it overrides previous or does a no-op.

EDIT2: my apologies. looks like aliases are not getting created at all.

elasticsearch 7.6 is EOL and no longer supported. Please upgrade ASAP.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

Hello

Looks like ILM is having issues. Here is the error:

policy [apm-ilm] for index [apm-index-019364] on an error step due to a transient error, moving back to the failed step [aliases] for execution. retry attempt [5]

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