I have an action file with 7 steps.
---
actions:
1:
action: rollover
description: >-
Rollover index <index>-logs-*
options:
name: active-<index>-logs #Enter alias name not index name
conditions:
max_age: 1d
new_index: "<index-logs-{now/d}-1>"
extra_settings:
index.number_of_shards: 2
index.number_of_replicas: 1
index.routing.allocation.include.box_type: hot
continue_if_exception: False
disable_action: False #True
2:
action: alias
description: add search alias to all indices
options:
name: search-index-logs
disable_action: False
continue_if_exception: False #True
add:
filters:
- filtertype: pattern
kind: prefix
value: index-logs-
3:
action: alias
description: >-
Add alias to new index and remove active index from old index
options:
name: active-index-logs
disable_action: False #True
continue_if_exception: False
add:
filters:
- filtertype: pattern
kind: prefix
value: index-logs-
- filtertype: age
source: creation_date
#timestring: '%Y.%m.%d'
direction: younger
unit: days
unit_count: 1
remove:
filters:
- filtertype: pattern
kind: prefix
value: index-logs-
- filtertype: age
source: creation_date
#timestring: '%Y.%m.%d'
direction: older
unit: days
unit_count: 1
4:
action: alias
description: add inactive alias
options:
name: inactive-index-logs
disable_action: False #True
continue_if_exception: False
add:
filters:
- filtertype: pattern
kind: prefix
value: index-logs-
- filtertype: age
source: creation_date
#timestring: '%Y.%m.%d'
direction: older
unit: days
unit_count: 1
5:
action: index_settings
description: >-
Set old indices to read-only
options:
disable_action: False #True
index_settings:
index:
blocks:
write: True
continue_if_exception: False
preserve_existing: False
ignore_unavailable: True
filters:
- filtertype: alias
aliases: inactive-index-logs
- filtertype: age
source: creation_date
direction: older
unit: days
unit_count: 1
6:
action: shrink
description: >-
Shrink old index-indices to 1 shard
options:
timeout_override: 300
disable_action: False #True
continue_if_exception: True
shrink_node: DETERMINISTIC
number_of_shards: 1
number_of_replicas: 0
shrink_prefix: inactive-
shrink_suffix: null
delete_after: False
post_allocation:
allocation_type: include
key: box_type
value: hot
wait_for_active_shards: 1
wait_for_completion: True
wait_for_rebalance: False
wait_interval: 30
extra_settings:
settings:
index.blocks.write: true
filters:
- filtertype: alias
aliases: inactive-index-logs
- filtertype: age
source: creation_date
direction: younger
unit: days
unit_count: 2
- filtertype: age
source: creation_date
direction: older
unit: days
unit_count: 1
7:
action: delete_indices
description: Delete inactive indexes that are more than X days old
options:
timeout_override: 300
disable_action: False #True
continue_if_exception: False
filters:
- filtertype: alias
aliases: inactive-fusion-logs
- filtertype: age
source: creation_date
#timestring: '%Y.%m.%d'
direction: older
unit: days
unit_count: 7```
The issue is that after running step 5 where the index settings are successfully updated with `index.blocks.write: True`
In the shrink step the index setting changes to `index.blocks.write: False` .
I'm using ES 6.2.2 and Curator 5.8.