# ILM shrink adds random uuid but no aliases created

**URL:** <https://discuss.elastic.co/t/ilm-shrink-adds-random-uuid-but-no-aliases-created/316457>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [October 12, 2022, 4:59pm UTC](https://discuss.elastic.co/t/ilm-shrink-adds-random-uuid-but-no-aliases-created/316457 "2022-10-12T16:59:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![danksim](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@danksim](https://discuss.elastic.co/u/danksim)\
**Post date:** [October 12, 2022, 4:59pm UTC](https://discuss.elastic.co/t/ilm-shrink-adds-random-uuid-but-no-aliases-created/316457/1 "2022-10-12T16:59:29Z")

</div>

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](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/ilm-shrink.html)).

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`:

```auto
$ 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>`:

```auto
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:

```auto
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`:

```auto
  "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](https://discuss.elastic.co/t/security-issue-for-indices-shrunken-by-ilm/298616) 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**.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 12, 2022, 4:59pm UTC](https://discuss.elastic.co/t/ilm-shrink-adds-random-uuid-but-no-aliases-created/316457/2 "2022-10-12T16:59:29Z")

</div>

elasticsearch 7.6 is [EOL](https://www.elastic.co/support/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: )

---

<div class="post-metadata">

**Author:** ![danksim](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@danksim](https://discuss.elastic.co/u/danksim)\
**Post date:** [October 14, 2022, 3:12pm UTC](https://discuss.elastic.co/t/ilm-shrink-adds-random-uuid-but-no-aliases-created/316457/3 "2022-10-14T15:12:32Z")

</div>

Hello

---

<div class="post-metadata">

**Author:** ![danksim](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@danksim](https://discuss.elastic.co/u/danksim)\
**Post date:** [October 18, 2022, 3:35pm UTC](https://discuss.elastic.co/t/ilm-shrink-adds-random-uuid-but-no-aliases-created/316457/4 "2022-10-18T15:35:36Z")

</div>

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

```auto
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]

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 15, 2022, 3:36pm UTC](https://discuss.elastic.co/t/ilm-shrink-adds-random-uuid-but-no-aliases-created/316457/5 "2022-11-15T15:36:02Z")

</div>

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