You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to accomplish the following:
If an index is older than X date unit then take a snapshot and delete it.
Seems an easy task (see below my actions.yaml), however It may occur that the index's date doesnt match the first step's filter so snapshot won't be taken but after the first action it will match the second step (because some second passed since the 1st) and the index gets deleted.
Expected Behavior
Snapshot and delete phase should work on the same set of indices
Actual Behavior
Unfortunately time - as usual - passes between the different actions.
Steps to Reproduce the Problem
actions:
1:
action: snapshot
description: "Creating snapshot"
options:
repository: repo
wait_for_completion: True
continue_if_exception: False
disable_action: False
ignore_empty_list: True
filters:
- filtertype: age
source: creation_date
direction: older
unit: minutes
unit_count: 1
2:
action: delete_indices
description: "Clean up ES by deleting old indices"
options:
continue_if_exception: False
disable_action: False
ignore_empty_list: True
filters:
- filtertype: age
source: creation_date
direction: older
unit: minutes
unit_count: 1
PUT localhost:9200/myindex at 21:01:03
curator's task gets launched at 22:02:01 :
22:02:02.980 : Action1 filter doesnt match -> no snapshot is taken (or taken for other indices)
22:02:03.100: Action2 filter matches -> deletes the index
I thought that maybe wait_for_completion=False can solve this, but the documentation states it can also take some time to return. And I dont want to be in a situation where it returns immediately and the index gets deleted earlier than a snapshot is taken. edit: it doesnt even work, because of an error thrown by the deletion action (cant delete index that is being snapshot)
So what to do?
Can snapshot and delete based on the same timestamp somehow?
Or can I pass filtered indexes from phase1 to phase2?
The text was updated successfully, but these errors were encountered:
General description
I am unable to accomplish the following:
If an index is older than X date unit then take a snapshot and delete it.
Seems an easy task (see below my actions.yaml), however It may occur that the index's date doesnt match the first step's filter so snapshot won't be taken but after the first action it will match the second step (because some second passed since the 1st) and the index gets deleted.
Expected Behavior
Snapshot and delete phase should work on the same set of indices
Actual Behavior
Unfortunately time - as usual - passes between the different actions.
Steps to Reproduce the Problem
PUT localhost:9200/myindex at 21:01:03
curator's task gets launched at 22:02:01 :
22:02:02.980 : Action1 filter doesnt match -> no snapshot is taken (or taken for other indices)
22:02:03.100: Action2 filter matches -> deletes the index
I thought that maybe wait_for_completion=False can solve this, but the documentation states it can also take some time to return. And I dont want to be in a situation where it returns immediately and the index gets deleted earlier than a snapshot is taken. edit: it doesnt even work, because of an error thrown by the deletion action (cant delete index that is being snapshot)
So what to do?
Can snapshot and delete based on the same timestamp somehow?
Or can I pass filtered indexes from phase1 to phase2?
The text was updated successfully, but these errors were encountered: