elastic / elastic/curator

Date math issue with Elastic Cloud & proxies

Open
#939 4 comments 0 reactions 0 assignees View on GitHub
KNOWN ISSUE
Dominant language
Python
Stars
3.1k
Forks
627
PR merge metrics
No merged PRs in 30d

Description

It seems there is a problem when you increase a date using date math but it doesn't happen when you decrease it.

For example if you have a yaml with this action:
```
actions:
1:
action: create_index
description: "Create index for next month"
options:
name:
```

It works as expected and this is the log output
```
2017-04-24 10:48:51,556 DEBUG curator.utils parse_date_pattern:1034 Fully rendered name:
2017-04-24 10:48:51,557 DEBUG curator.cli process_action:98 Doing the action here.
2017-04-24 10:48:51,557 INFO curator.actions.create_index do_action:391 Creating index "" with settings: {}
2017-04-24 10:48:51,845 INFO curator.cli cli:203 Action ID: 1, "create_index" completed.
```

but if you use the same action but increasing the time, you get an error, for example:
```
actions:
1:
action: create_index
description: "Create index for next month"
options:
name:
```

Log output:
```
2017-04-24 11:00:49,281 INFO Creating index "" with settings: {}
2017-04-24 11:00:49,333 ERROR Failed to complete action: create_index. : Exception encountered. Rerun with loglevel DEBUG and/or check Elasticsearch logs for more information. Exception: TransportError(400, u'parse_exception', u'operator not supported for date math [/d 1d]')
```

Thanks for your help

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the create_index action with the two date-math expressions shown in the YAML and compare the Elasticsearch error for the positive offset. Trace the date-pattern handling from the create_index entry point, then verify that increasing and decreasing dates both render successfully without the parse_exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.