{"action":"closed","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/33485","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/33485/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/33485/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/33485/events","html_url":"https://github.com/elastic/elasticsearch/issues/33485","id":357849823,"node_id":"MDU6SXNzdWUzNTc4NDk4MjM=","number":33485,"title":"ILM policy with empty \"warm\" phase still enforces read only indices","user":{"login":"dakrone","id":19060,"node_id":"MDQ6VXNlcjE5MDYw","avatar_url":"https://avatars3.githubusercontent.com/u/19060?v=4","gravatar_id":"","url":"https://api.github.com/users/dakrone","html_url":"https://github.com/dakrone","followers_url":"https://api.github.com/users/dakrone/followers","following_url":"https://api.github.com/users/dakrone/following{/other_user}","gists_url":"https://api.github.com/users/dakrone/gists{/gist_id}","starred_url":"https://api.github.com/users/dakrone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dakrone/subscriptions","organizations_url":"https://api.github.com/users/dakrone/orgs","repos_url":"https://api.github.com/users/dakrone/repos","events_url":"https://api.github.com/users/dakrone/events{/privacy}","received_events_url":"https://api.github.com/users/dakrone/received_events","type":"User","site_admin":false},"labels":[{"id":912828538,"node_id":"MDU6TGFiZWw5MTI4Mjg1Mzg=","url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Core/ILM","name":":Core/ILM","color":"0e8a16","default":false},{"id":23173,"node_id":"MDU6TGFiZWwyMzE3Mw==","url":"https://api.github.com/repos/elastic/elasticsearch/labels/%3Ebug","name":">bug","color":"b60205","default":false}],"state":"closed","locked":false,"assignee":{"login":"gwbrown","id":1522844,"node_id":"MDQ6VXNlcjE1MjI4NDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1522844?v=4","gravatar_id":"","url":"https://api.github.com/users/gwbrown","html_url":"https://github.com/gwbrown","followers_url":"https://api.github.com/users/gwbrown/followers","following_url":"https://api.github.com/users/gwbrown/following{/other_user}","gists_url":"https://api.github.com/users/gwbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/gwbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwbrown/subscriptions","organizations_url":"https://api.github.com/users/gwbrown/orgs","repos_url":"https://api.github.com/users/gwbrown/repos","events_url":"https://api.github.com/users/gwbrown/events{/privacy}","received_events_url":"https://api.github.com/users/gwbrown/received_events","type":"User","site_admin":false},"assignees":[{"login":"gwbrown","id":1522844,"node_id":"MDQ6VXNlcjE1MjI4NDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1522844?v=4","gravatar_id":"","url":"https://api.github.com/users/gwbrown","html_url":"https://github.com/gwbrown","followers_url":"https://api.github.com/users/gwbrown/followers","following_url":"https://api.github.com/users/gwbrown/following{/other_user}","gists_url":"https://api.github.com/users/gwbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/gwbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwbrown/subscriptions","organizations_url":"https://api.github.com/users/gwbrown/orgs","repos_url":"https://api.github.com/users/gwbrown/repos","events_url":"https://api.github.com/users/gwbrown/events{/privacy}","received_events_url":"https://api.github.com/users/gwbrown/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2018-09-06T22:22:53Z","updated_at":"2018-09-25T21:04:43Z","closed_at":"2018-09-25T21:04:43Z","author_association":"MEMBER","body":"Consider the following policy:\r\n\r\n```json\r\nPUT /_ilm/delete-only-policy\r\n{\r\n  \"policy\": {\r\n    \"phases\": {\r\n      \"delete\": {\r\n        \"after\": \"30d\",\r\n        \"actions\": {\r\n          \"delete\": {}\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nWhere 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:\r\n\r\n```json\r\nPUT /_cluster/settings\r\n{\r\n  \"transient\": {\r\n    \"indices.lifecycle.poll_interval\": \"10s\"\r\n  }\r\n}\r\n\r\nPUT /bar\r\n{\r\n  \"settings\": {\r\n    \"index.number_of_shards\": 1,\r\n    \"index.number_of_replicas\": 0,\r\n    \"index.lifecycle.name\": \"delete-only-policy\"\r\n  }\r\n}\r\n\r\nPOST /bar/1\r\n{\r\n  \"baz\": \"eggplant\"\r\n}\r\n```\r\n\r\n```json\r\n{\r\n  \"error\" : {\r\n    \"root_cause\" : [\r\n      {\r\n        \"type\" : \"cluster_block_exception\",\r\n        \"reason\" : \"blocked by: [FORBIDDEN/8/index write (api)];\"\r\n      }\r\n    ],\r\n    \"type\" : \"cluster_block_exception\",\r\n    \"reason\" : \"blocked by: [FORBIDDEN/8/index write (api)];\"\r\n  },\r\n  \"status\" : 403\r\n}\r\n```"}}
{"actor":{"display_login":"gwbrown"}}