Delete_snapshot action fails, get() takes at least 2 arguments (2 given)

Hi,

We have the following action file for curator:

---
actions:
  1:
    action: delete_snapshots
    description: >-
      Delete snapshots older than 6 months for all logstash snapshots
    options:
      repository: sealikrebak01
      disable_action: False
      timeout_override: 10000
      ignore_empty_list: True
    filters:
    - filtertype: pattern
      kind: prefix
      value: snapshot-
      exclude:
    - filtertype: age
      source: creation_date
      direction: older
      unit: months
      unit_count: 6

But when we run it we get the following error message:

2020-02-19 10:43:37,553 INFO Action ID: 1, "delete_snapshots" completed.
2020-02-19 10:43:37,553 INFO Job completed.
2020-02-19 10:47:43,942 INFO Preparing Action ID: 1, "delete_snapshots"
2020-02-19 10:47:43,942 INFO Creating client object and testing connection
2020-02-19 10:47:43,945 INFO Instantiating client object
2020-02-19 10:47:43,945 INFO Testing client connectivity
2020-02-19 10:47:43,949 INFO Successfully created Elasticsearch client object with provided settings
2020-02-19 10:47:43,951 INFO Trying Action ID: 1, "delete_snapshots": Delete snapshots older than 6 months for all logstash snapshots
2020-02-19 10:47:45,268 INFO Deleting 53 selected snapshots: [u'snapshot-logstash-20190805', u'snapshot-beats-20190805', u'snapshot-system-20190805', u'snapshot-logstash-20190806', u'snapshot-beats-20190806', u'snapshot-system-20190806', u'snapshot-logstash-20190807', u'snapshot-beats-20190807', u'snapshot-system-20190807', u'snapshot-logstash-20190808', u'snapshot-beats-20190808', u'snapshot-system-20190808', u'snapshot-logstash-20190809', u'snapshot-beats-20190809', u'snapshot-system-20190809', u'snapshot-logstash-20190810', u'snapshot-beats-20190810', u'snapshot-system-20190810', u'snapshot-logstash-20190811', u'snapshot-beats-20190811', u'snapshot-system-20190811', u'snapshot-logstash-20190812', u'snapshot-beats-20190812', u'snapshot-system-20190812', u'snapshot-logstash-20190813', u'snapshot-beats-20190813', u'snapshot-system-20190813', u'snapshot-logstash-20190814', u'snapshot-beats-20190814', u'snapshot-system-20190814', u'snapshot-logstash-20190815', u'snapshot-beats-20190815', u'snapshot-system-20190815', u'snapshot-logstash-20190816', u'snapshot-beats-20190816', u'snapshot-system-20190816', u'snapshot-logstash-20190817', u'snapshot-beats-20190817', u'snapshot-system-20190817', u'snapshot-logstash-20190818', u'snapshot-beats-20190818', u'snapshot-system-20190818', u'snapshot-logstash-20190819', u'snapshot-beats-20190819', u'snapshot-logstash-20190820', u'snapshot-beats-20190820', u'snapshot-system-20190820', u'snapshot-logstash-20190821', u'snapshot-beats-20190821', u'snapshot-system-20190821', u'snapshot-logstash-20190822', u'snapshot-beats-20190822', u'snapshot-system-20190822']
2020-02-19 10:47:45,922 ERROR Failed to complete action: delete_snapshots. <type 'exceptions.TypeError'>: get() takes at least 2 arguments (2 given)

If i run the action with --dry-run, no errors are generated. What is the issue here?
Curator version 5.8 in a docker container

To see a bit better what's going on here, please enable DEBUG logging.

Also, what is the endpoint (cluster size? hardware/cloud?)? Is the cluster very busy? Do requests sometimes timeout or take time to return?

I've attached the debug logs here: https://send.firefox.com/download/ce5d02d737963bd6/#Am5RlFflO_ue34XEAZ--wQ

Yes the cluster is very busy and timeouts do occur.

Detected Elasticsearch version 7.6.0

How was Curator installed? There may be some API changes if you installed via pip, as the elasticsearch-py module newer than 7.1.0 may yet have some inconsistencies.

Possible remedies are to install the RPM/DEB version of Curator, or to force install version 7.1.0 of the Elasticsearch python module.

I'm fairly sure this has to do with this bug in the elasticsearch python library. I am running into a smiliar issue where I have a lambda function that, along other things, deletes old snapshots.... That specific functionality no longer works.

2 Likes

I've tried installing the latest version of Curator as a DEB and still got the same error. That is with curator 5.8.1.

That should not be possible. The error only exists with elasticsearch-py version 7.5.x, and the DEB package is built with elasticsearch-py version 7.1.0. If you've installed the DEB, and are launching Curator via /usr/bin/curator, it should not be possible to get that error.

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