# Elastic ignoring cold\_role

**URL:** https://discuss.elastic.co/t/elastic-ignoring-cold-role/272262
**Category:** Elasticsearch
**Tags:** ilm-index-lifecycle-management
**Created:** [May 6, 2021, 9:08am UTC](https://discuss.elastic.co/t/elastic-ignoring-cold-role/272262 "2021-05-06T09:08:49Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![mverbeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mverbeek/32/101709_2.png) [@mverbeek](https://discuss.elastic.co/u/mverbeek)
#### Post date: [May 6, 2021, 9:08am UTC](https://discuss.elastic.co/t/elastic-ignoring-cold-role/272262/1 "2021-05-06T09:08:50Z")

</div>

We have an Elastic stack on 7.6.1 that we upgrades to 7.10.2. Then we introduced new nodes with slower bigger storage to it with cold\_node role and set the others to data\_warm, data\_hot and data\_content.  
During the install an error was made and warm/hot shards where placed on the new cold\_role nodes.  
Now after everything is correct it still places shards from warm and hot indices on the cold nodes when balancing. I reproduced the error in an test environment and upgraded that environment to the latest version but the error/bug still remains.  
So in the end we have en environment with the correct roles according to documentation but all the shards are still being balanced like they all have the same role.  
If I do an correct install with this configuration without an upgrade or data involved it confirms that the configuration is correct and I am unable to move hot/warm index shards to the cold nodes.

Any ideas would be greatly appreciated.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 10, 2021, 12:47am UTC](https://discuss.elastic.co/t/elastic-ignoring-cold-role/272262/2 "2021-05-10T00:47:20Z")

</div>

Are you using ILM here?

---

<div class="post-metadata">

### Author: ![mverbeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mverbeek/32/101709_2.png) [@mverbeek](https://discuss.elastic.co/u/mverbeek)
#### Post date: [May 10, 2021, 7:13am UTC](https://discuss.elastic.co/t/elastic-ignoring-cold-role/272262/3 "2021-05-10T07:13:12Z")

</div>

Yes, but normally if you use the reroute command you can also not move to cold nodes if they are not cold and that is also still posibble

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 10, 2021, 7:18am UTC](https://discuss.elastic.co/t/elastic-ignoring-cold-role/272262/4 "2021-05-10T07:18:39Z")

</div>

What is the output from `GET /_cat/nodeattrs`?

---

<div class="post-metadata">

### Author: ![mverbeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mverbeek/32/101709_2.png) [@mverbeek](https://discuss.elastic.co/u/mverbeek)
#### Post date: [May 10, 2021, 7:22am UTC](https://discuss.elastic.co/t/elastic-ignoring-cold-role/272262/5 "2021-05-10T07:22:44Z")

</div>

xpack.installed true  
transform.node false/true (depending on node)  
hypervisor "hypervisor-name"

Nothing about the cold roles

---

<div class="post-metadata">

### Author: ![mverbeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mverbeek/32/101709_2.png) [@mverbeek](https://discuss.elastic.co/u/mverbeek)
#### Post date: [May 10, 2021, 7:24am UTC](https://discuss.elastic.co/t/elastic-ignoring-cold-role/272262/6 "2021-05-10T07:24:25Z")

</div>

To add to this:  
The \_nodes/stats does list the correct roles

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 10, 2021, 7:29am UTC](https://discuss.elastic.co/t/elastic-ignoring-cold-role/272262/7 "2021-05-10T07:29:24Z")

</div>

Do your index templates have any allocation config specified in them for when they are created?

---

<div class="post-metadata">

### Author: ![mverbeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mverbeek/32/101709_2.png) [@mverbeek](https://discuss.elastic.co/u/mverbeek)
#### Post date: [May 10, 2021, 7:32am UTC](https://discuss.elastic.co/t/elastic-ignoring-cold-role/272262/8 "2021-05-10T07:32:59Z")

</div>

Nope, it only checks that they are balanced across hypervisors. And those settings work in an fresh install while respecting the node role

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 10, 2021, 7:55am UTC](https://discuss.elastic.co/t/elastic-ignoring-cold-role/272262/9 "2021-05-10T07:55:26Z")

</div>

What does your ILM policy and the matching templates look like?

---

<div class="post-metadata">

### Author: ![mverbeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mverbeek/32/101709_2.png) [@mverbeek](https://discuss.elastic.co/u/mverbeek)
#### Post date: [May 10, 2021, 8:00am UTC](https://discuss.elastic.co/t/elastic-ignoring-cold-role/272262/10 "2021-05-10T08:00:36Z")

</div>

De ILM policy is:

```auto
{
  "auditbeat-ilm" : {
    "version" : 2,
    "modified_date" : "2021-04-15T12:31:17.536Z",
    "policy" : {
      "phases" : {
        "warm" : {
          "min_age" : "1d",
          "actions" : {
            "forcemerge" : {
              "max_num_segments" : 1
            },
            "set_priority" : {
              "priority" : 50
            },
            "shrink" : {
              "number_of_shards" : 1
            }
          }
        },
        "cold" : {
          "min_age" : "93d",
          "actions" : {
            "allocate" : {
              "number_of_replicas" : 1,
              "include" : { },
              "exclude" : { },
              "require" : { }
            },
            "freeze" : { }
          }
        },
        "hot" : {
          "min_age" : "0ms",
          "actions" : {
            "rollover" : {
              "max_size" : "50gb",
              "max_age" : "7d"
            },
            "set_priority" : {
              "priority" : 100
            }
          }
        },
        "delete" : {
          "min_age" : "367d",
          "actions" : {
            "delete" : {
              "delete_searchable_snapshot" : true
            }
          }
        }
      }
    }
  }
}

```

The template is the one provides by the modules, so in this ILM the auditbeat module

---

<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: [June 7, 2021, 8:00am UTC](https://discuss.elastic.co/t/elastic-ignoring-cold-role/272262/11 "2021-06-07T08:00:54Z")

</div>

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