Skip to content

ILM policy with empty "warm" phase still enforces read only indices #33485

@dakrone

Description

@dakrone

Consider the following policy:

PUT /_ilm/delete-only-policy
{
  "policy": {
    "phases": {
      "delete": {
        "after": "30d",
        "actions": {
          "delete": {}
        }
      }
    }
  }
}

Where the intent is to delete the index after 30 days. Because of the injected "read-only" step in the warm phase with an after time of 0 seconds, the index is immediately marked as read only. So this returns the following:

PUT /_cluster/settings
{
  "transient": {
    "indices.lifecycle.poll_interval": "10s"
  }
}

PUT /bar
{
  "settings": {
    "index.number_of_shards": 1,
    "index.number_of_replicas": 0,
    "index.lifecycle.name": "delete-only-policy"
  }
}

POST /bar/1
{
  "baz": "eggplant"
}
{
  "error" : {
    "root_cause" : [
      {
        "type" : "cluster_block_exception",
        "reason" : "blocked by: [FORBIDDEN/8/index write (api)];"
      }
    ],
    "type" : "cluster_block_exception",
    "reason" : "blocked by: [FORBIDDEN/8/index write (api)];"
  },
  "status" : 403
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions