Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curator restore snapshot action failing with error missing .kibana_security_session_1 index #1619

Open
msimos opened this issue Sep 28, 2021 · 0 comments

Comments

@msimos
Copy link

msimos commented Sep 28, 2021

After upgrading from v7.5 to v7.14.0, cannot restore snapshots using curator restore action due to the following error related to the index .kibana_security_session_1

2021-09-15 14:42:45,883 ERROR     curator.actions.snapshot           report_state:1949 Some of the indices do not appear to have been restored. Missing: ['.kibana_security_session_1']
2021-09-15 14:42:45,883 ERROR                curator.cli                    run:213  Failed to complete action: restore.  <class 'curator.exceptions.FailedExecution'>: Exception encountered.  Rerun with loglevel DEBUG and/or check Elasticsearch logs for more information. Exception: Some of the indices do not appear to have been restored. Missing: ['.kibana_security_session_1']

Here is the sequence to reproduce the error:

Config file curator.yml

client:
  hosts:
    -  hostname
  port: 9200
  use_ssl: True
  certificate: '/path/to/certs/ca.pem'
  ssl_no_validate: false
  username: elastic
  password: <redacted>

logging:
  loglevel: DEBUG
  logfile: '/path/to/logs/curator.log'
  logformat: default

Create the snapshot:
curator_action_snapshot.yml

actions:
  1:
    action: snapshot
    description: "Snapshot prefixed indices as in 'filters' to 'repository' with the snapshot name pattern in 'name'"
    options:
      repository: cadm_snapshots_repository
      # Leaving name blank will result in the default 'curator-%Y%m%d%H%M%S'
      name: 'snapshot-%Y%m%d%H%M%S'
      wait_for_completion: True
      max_wait: -1
      wait_interval: 9
      ignore_empty_list: True
      disable_action: False
    filters:
    - filtertype: pattern
      kind: prefix
      value: .*

Capture the snapshot

/usr/bin/curator --config curator.yml curator_action_snapshot.yml

Close all indices using _close API:

POST /_all/_close?expand_wildcards=all&pretty

Restore the snapshot
curator_action_restore.yml

actions:
  1:
    action: restore
    description: "Restore a list of indices in the provided snapshot"
    options:
      repository: snapshots_repository
      # If name is blank, the most recent snapshot by age will be selected
      name: ''
      # If indices is blank, all indices in the snapshot will be restored
      indices:
      wait_for_completion: True
      max_wait: -1
      wait_interval: 9
      ignore_empty_list: True
      disable_action: False
    filters:
    - filtertype: state
      state: SUCCESS

Run the snapshot restore

/usr/bin/curator --config curator.yml curator_action_restore.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant