flant / curator-opensearch

Curator for OpenSearch.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Version compatibility check error when rolling over

leongshengmin opened this issue · comments

Curator version: 0.0.9
Opensearch version: 2.4.0

Expected behaviour: Rollover happens without errors
Actual behavior: Version compatibility error saying max_size param isn't supported in rollover.yml file.

Command ran: curator --config /etc/curator/config.yml /etc/curator/rollover.yml

{"@timestamp": "2022-12-28T03:43:44.096Z", "function": "get_client", "linenum": 1061, "loglevel": "INFO", "message": "Cluster info: {'name': 'i-0cd0782df8c01abb7', 'cluster_name': 'stg-opensearch', 'cluster_uuid': 'EI1EkHMyRou4A9D3LLhB8A', 'version': {'distribution': 'opensearch', 'number': '2.4.0', 'build_type': 'tar', 'build_hash': '744ca260b892d119be8164f48d92b8810bd7801c', 'build_date': '2022-11-15T04:42:29.671309257Z', 'build_snapshot': False, 'lucene_version': '9.4.1', 'minimum_wire_compatibility_version': '7.10.0', 'minimum_index_compatibility_version': '7.0.0'}, 'tagline': 'The OpenSearch Project: https://opensearch.org/'}", "name": "curator.utils"}

...

{"@timestamp": "2022-12-28T03:43:44.113Z", "function": "run", "linenum": 214, "loglevel": "ERROR", "message": "Failed to complete action: rollover.  <class 'curator.exceptions.ConfigurationError'>: Your version of elasticsearch ((2, 4, 0)) does not support the max_size rollover condition. It is only supported in versions 6.1.0 and up.", "name": "curator.cli"}

Update: believe this is linked to #9 (open MR)

Hi.
Please provide rollover.yml-file for debugging.

I'm seeing the same behavior even after pip installing from github (meaning #9 didn't fix the issue). Here's my basic rollover.yml file.

---
actions:
  1:
    action: rollover
    description: >-
      Rollover the index associated with alias 'aliasname', which should be in the
      form of prefix-000001 (or similar), or prefix-YYYY.MM.DD-1.
    options:
      name: dataprepper
      conditions:
        max_age: 1d
        max_docs: 10
        max_size: 5mb

Output:

/miniforge3/bin/curator --config /curator-config.yml  /rollover.yml
2023-02-06 16:52:09,799 INFO      Preparing Action ID: 1, "rollover"
2023-02-06 16:52:09,799 INFO      Creating client object and testing connection
2023-02-06 16:52:09,801 INFO      kwargs = {'hosts': ['localhost'], 'use_ssl': False, 'aws_key': 'REDACTED', 'aws_token': 'REDACTED', 'ssl_show_warn': False, 'ssl_no_validate': False, 'aws_sign_request': False, 'client_cert': None, 'client_key': None, 'certificate': None, 'http_auth': None, 'url_prefix': '', 'port': 9200, 'aws_secret_key': 'REDACTED', 'timeout': 30, 'connection_class': <class 'opensearchpy.connection.http_requests.RequestsHttpConnection'>, 'aws_region': False, 'api_key': None}
2023-02-06 16:52:09,801 INFO      Instantiating client object
2023-02-06 16:52:09,801 INFO      Testing client connectivity
2023-02-06 16:52:09,809 INFO      GET http://localhost:9200/ [status:200 request:0.007s]
2023-02-06 16:52:09,809 INFO      Cluster info: {'name': 'vyasa-logging', 'cluster_name': 'VyasaLogging', 'cluster_uuid': 'ZQsQYNQMSVOPQwZSJackmA', 'version': {'distribution': 'opensearch', 'number': '2.5.0', 'build_type': 'tar', 'build_hash': 'b8a8b6c4d7fc7a7e32eb2cb68ecad8057a4636ad', 'build_date': '2023-01-18T23:48:48.981786100Z', 'build_snapshot': False, 'lucene_version': '9.4.2', 'minimum_wire_compatibility_version': '7.10.0', 'minimum_index_compatibility_version': '7.0.0'}, 'tagline': 'The OpenSearch Project: https://opensearch.org/'}
2023-02-06 16:52:09,809 INFO      Successfully created Elasticsearch client object with provided settings
2023-02-06 16:52:09,811 INFO      GET http://localhost:9200/ [status:200 request:0.002s]
2023-02-06 16:52:09,811 INFO      Connecting only to local master node...
2023-02-06 16:52:09,814 INFO      GET http://localhost:9200/_nodes/_local [status:200 request:0.003s]
2023-02-06 16:52:09,817 INFO      GET http://localhost:9200/_cluster/state/master_node [status:200 request:0.002s]
2023-02-06 16:52:09,819 INFO      GET http://localhost:9200/dataprepper/_alias [status:200 request:0.002s]
2023-02-06 16:52:09,821 INFO      GET http://localhost:9200/dataprepper/_settings [status:200 request:0.002s]
2023-02-06 16:52:09,821 INFO      Trying Action ID: 1, "rollover": Rollover the index associated with alias 'aliasname', which should be in the form of prefix-000001 (or similar), or prefix-YYYY.MM.DD-1.
2023-02-06 16:52:09,822 INFO      GET http://localhost:9200/ [status:200 request:0.001s]
2023-02-06 16:52:09,822 ERROR     Failed to complete action: rollover.  <class 'curator.exceptions.ConfigurationError'>: Your version of elasticsearch ((2, 5, 0)) does not support the max_size rollover condition. It is only supported in versions 6.1.0 and up.