ILM: keep all indices on hot node

Hello,

I'm transitioning to ILM and at the moment, I have hot and warm nodes. Warm nodes don't have any data as I have cluster.routing.allocation.exclude._ip set on the warm nodes.

I want to create an ILM policy that will keep all indices on the hot nodes if I remove cluster routing allocation settings. I will than later set different ILM policies to migrate indices to warm nodes.

At the moment, this is my policy:

{ - 
  "hot-node-forever": { - 
    "version": 5,
    "modified_date": "2021-02-01T15:19:08.580Z",
    "policy": { - 
      "phases": { - 
        "hot": { - 
          "min_age": "0ms",
          "actions": { - 
            "set_priority": { - 
              "priority": 100
            }
          }
        },
        "warm": { - 
          "min_age": "5000d",
          "actions": { - 
            "allocate": { - 
              "include": { - 

              },
              "exclude": { - 

              },
              "require": { - 
                "tier": "warm"
              }
            },
            "set_priority": { - 
              "priority": 50
            }
          }
        }
      }
    }
  }
}

I set hot-node-forever to all my indices:

PUT logs-*/_settings
{
  "index": {
    "lifecycle": {
      "name": "hot-node-forever"
    }
  }
}

I then remove the cluster routing policy but the cluster starts to migrate indices to warm nodes. None of the indices are older than a year.

Am I doing this right? I did RTFM and it seems like this should work (only migrate if indices are older than 5000 days), but somehow it doesn't. What am I missing?

Don't you need to remove this part from the policy?

I expect this to say: keep indices on hot nodes, but migrate to warm nodes once they are older than 5000 days.

I decided to go with index.routing.allocation.require.tier setting and move all indices to hot nodes. I'll migrate to ILM only new indices once I have new templates ready.

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