When upgrading from 7.6.1 to 7.10.2, I replaced the old node.master and node.data setting to the new node.roles setting. I changed 2 of the 5 data nodes to data_cold only. But if the node has already been used as an data node before it will not respect this role. It will start and work as expected but it will still hold warm/hot shards. You can also still move warm/hot shards to the node.
When I do an fresh install with 7.10.2 with the same config and cluster settings it does use the data_cold role as expected.
I typed out an simple log to recreate this problem if anyone wants to recreate it.
Note: upgrading to the newest version of Elastic also did not work.
Ok this shard can be allocated to all three nodes. What does GET /my-index-000006/_settings return? What steps have you taken to exclude it from the cold node?
Currently on this test environment nothing outside of the roles, If I recreate it like this with an fresh install the shard cannot be moved to that cold node since it does not meet the requirement.
[NO(index has a preference for tiers [data_content] and node does not meet the required [data_content] tier)]
Would it be possible that Elastic has an internal system that prevents the cold/hot/warm role from working until there are enough managed indices?
I have been testing with that theory and it seems to be working but then why do the roles work immediately with an fresh install.
This index has no settings to restrict its allocation to any particular tier so it can be allocated anywhere. If you check GET /$INDEX/_settings on your fresh install you will see that newer indices do have allocation settings applied. If you want to restrict the older indices to particular tiers you'll need to apply those settings yourself.
Weird then, then I still can't explain the behavior on the production server. It ignored the roles completely until I added an new cold policy to change an bunch of older indices to cold. But we already had an working hot/warm/cold ILM in place at that time.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.