Curator timestring

Hi,
I create a curator action file with 2 actions, and each of actions will execute for a long time. The first action create snapshot and 2nd actrion allocate the specified indices to the warm nodes.
If the 1st action complete at the next day, the 2nd action will move the wrong indices. How can I avoid this situation?
Both actions use the code snippet below

    filters:
    - filtertype: pattern
      kind: regex
      value: '^netflow-.*$'
    - filtertype: period
      period_type: relative
      source: name
      range_from: -1
      range_to: -1
      timestring: '%Y.%m.%d'
      unit: days

Attaching some DEBUG logs showing how the indices were include/excluded by the period configuration would go a long way to help diagnose this.

@theuntergeek I mean I want a global variable, so all the actions will match the same indices,
For example, I start 2 snapshot actions at Apr 9 23:59:44 UTC 2019, I want all actions match indices ['netflow-2019.04.08', 'oa-2019.04.08'], but the 2nd action may match ['netflow-2019.04.09', 'oa-2019.04.09']

---
# 1. Create snapshot
# 2. Allocate to warm node
actions:
  0:
    action: snapshot
    description: "Snapshot for oa and netflow"
    options:
      repository: my_backup
      wait_for_completion: true
    filters:
    - filtertype: pattern
      kind: regex
      value: '^(oa|netflow)-.*$'
    - filtertype: period
      period_type: relative
      source: name
      range_from: -1
      range_to: -1
      timestring: '%Y.%m.%d'
      unit: days

  1:
    action: snapshot
    description: "Snapshot for oa and netflow"
    options:
      repository: my_backup
      wait_for_completion: true
    filters:
    - filtertype: pattern
      kind: regex
      value: '^(oa|netflow)-.*$'
    - filtertype: period
      period_type: relative
      source: name
      range_from: -1
      range_to: -1
      timestring: '%Y.%m.%d'
      unit: days
[root@test34:curator]# date -s "07:59:40"
Wed Apr 10 07:59:40 CST 2019
[root@test34:curator]# date -u
Tue Apr  9 23:59:44 UTC 2019
[root@test34:curator]# curator /etc/curator/action.yml --config /etc/curator/config.yml 
2019-04-10 07:59:48,368 INFO      Preparing Action ID: 0, "snapshot"
2019-04-10 07:59:48,373 INFO      Trying Action ID: 0, "snapshot": Snapshot for oa and netflow
2019-04-10 07:59:49,625 INFO      Creating snapshot "curator-20190409235948" from indices: ['netflow-2019.04.08', 'oa-2019.04.08']
2019-04-10 07:59:50,971 INFO      Snapshot curator-20190409235948 still in progress.
2019-04-10 08:00:00,004 INFO      Snapshot curator-20190409235948 successfully completed.
2019-04-10 08:00:00,026 INFO      Snapshot curator-20190409235948 successfully completed.
2019-04-10 08:00:00,026 INFO      Action ID: 0, "snapshot" completed.
2019-04-10 08:00:00,026 INFO      Preparing Action ID: 1, "snapshot"
2019-04-10 08:00:00,037 INFO      Trying Action ID: 1, "snapshot": Snapshot for oa and netflow
2019-04-10 08:00:00,404 INFO      Creating snapshot "curator-20190410000000" from indices: ['netflow-2019.04.09', 'oa-2019.04.09']
2019-04-10 08:00:01,439 INFO      Snapshot curator-20190410000000 still in progress.
2019-04-10 08:00:10,471 INFO      Snapshot curator-20190410000000 successfully completed.
2019-04-10 08:00:10,493 INFO      Snapshot curator-20190410000000 successfully completed.
2019-04-10 08:00:10,493 INFO      Action ID: 1, "snapshot" completed.
2019-04-10 08:00:10,494 INFO      Job completed.

I see what you mean. That is a feature not coming until Curator 6, which has no target date as yet.

OK, Thanks for your replay

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