ILM: issue while trying to set replica:0

We're using the following ILM-policy with success.

PUT _ilm/policy/technical
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "set_priority": {
            "priority": 100
          }
        }
      },
      "warm": {
        "min_age": "5d",
        "actions": {
          "allocate": {
            "number_of_replicas": 1,
            "include": {},
            "exclude": {},
            "require": {
              "box_type": "warm"
            }
          },
          "forcemerge": {
            "max_num_segments": 1
          },
          "readonly": {},
          "set_priority": {
            "priority": 50
          }
        }
      },
      "cold": {
        "min_age": "14d",
        "actions": {
          "allocate": {
            "number_of_replicas": 0,
            "include": {},
            "exclude": {},
            "require": {
              "box_type": "warm"
            }
          },
          "set_priority": {
            "priority": 40
          }
        }
      },
      "delete": {
        "min_age": "21d",
        "actions": {
          "delete": {
            "delete_searchable_snapshot": true
          }
        }
      }
    }
  }
}

^ generated by ILM Web-UI

There's only one glitch in the plan: during cold-phase the replica-count isn't lowered to 0.

We tried to apply the changes via API and Web-UI -> settings were not stored.

We're using version 7.10.0

Is this a known bug or is this just not possible?

What's the output from the technical/_ilm/explain endpoint?

"technical-2020.11.18": {
          "index": "technical-2020.11.18",
          "managed": true,
          "policy": "technical",
          "lifecycle_date_millis": 1605657600340,
          "age": "14.97d",
          "phase": "cold",
          "phase_time_millis": 1606867201026,
          "action": "complete",
          "action_time_millis": 1606867207740,
          "step": "complete",
          "step_time_millis": 1606867207740,
          "phase_execution": {
              "policy": "technical",
              "phase_definition": {
                  "min_age": "14d",
                  "actions": {
                      "freeze": {},
                      "allocate": {
                          "number_of_replicas": 0,
                          "include": {},
                          "exclude": {},
                          "require": {
                              "box_type": "warm"
                          }
                      },
                      "set_priority": {
                          "priority": 40
                      }
                  }
              },
              "version": 29,
              "modified_date_in_millis": 1606897278047
          }
      },

as a snippet. I currently wonder if I maybe manually configured this index to have no replica...

Very nice.

I was so sure the /_ilm/policy/technical didn't show "number_of_replicas": 0,.

What a misery. Sorry

At least the webui is showing only this:

So I'd read this as "don't modify replica-settings".

If you're all sorted then, not a problem! :slight_smile:

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