Snapshot Management policy keeps failing

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): OS 2.5

Describe the issue: Keep getting this error when creating opensearch snapshot policy curl -k -X GET "$xxx/_plugins/_sm/policies/smpolicy1/_explain" {"policies":[{"name":"smpolicy1","creation":{"current_state":"CREATION_START","trigger":{"time":1691155620000},"latest_execution":{"status":"FAILED","start_time":1690565392608,"end_time":null}},"deletion":{"current_state":"DELETION_START","trigger":{"time":1693472400000},"latest_execution":{"status":"FAILED","start_time":1690794183557,"end_time":null}},"policy_seq_no":119913,"policy_primary_term":1,"enabled":true}]}

Configuration:

{
    "description": "Daily snapshot policy",
    "creation": {
      "schedule": {
        "cron": {
          "expression": "24 13 * * 5",
          "timezone": "America/New_York"
        }
      },
      "time_limit": "1h"
    },
    "deletion": {
      "schedule": {
        "cron": {
          "expression": "0 2 31 * *",
          "timezone": "America/New_York"
        }
      },
      "condition": {
        "max_age": "30d",
        "max_count": 50,
        "min_count": 5
      },
      "time_limit": "2h"
    },
    "snapshot_config": {
      "date_format": "yyyy-MM-dd-HH:mm",
      "timezone": "America/New_York",
      "indices": "*",
      "repository": "s3-repo",
      "ignore_unavailable": "true",
      "include_global_state": "false",
      "partial": "true",
      "metadata": {
        "any_key": "any_value"
      }
    },
    "notification": {
      "channel": {
        "id": "notifications-id"
      },
      "conditions": {
        "creation": true,
        "deletion": false,
        "failure": false,
        "time_limit_exceeded": false
      }
    }
}'

Relevant Logs or Screenshots:

Hey @jackbotsplash

what version are you using? tested this in my lab with 2.9.0 and was unable to reproduce it failing

{
  "_id": "testing-sm-policy",
  "_version": 9,
  "_seq_no": 511497,
  "_primary_term": 12,
  "sm_policy": {
    "name": "testing",
    "description": "testing",
    "schema_version": 18,
    "creation": {
      "schedule": {
        "cron": {
          "expression": "24 13 * * 5",
          "timezone": "America/New_York"
        }
      }
    },
    "deletion": {
      "schedule": {
        "cron": {
          "expression": "0 2 31 * *",
          "timezone": "America/New_York"
        }
      },
      "condition": {
        "max_age": "30d",
        "min_count": 5,
        "max_count": 50
      }
    },
    "snapshot_config": {
      "indices": "winlogbeat-2023.07.31",
      "ignore_unavailable": true,
      "include_global_state": true,
      "repository": "repository",
      "partial": true
    },
    "schedule": {
      "interval": {
        "start_time": 1690948016006,
        "period": 1,
        "unit": "Minutes"
      }
    },
    "enabled": true,
    "last_updated_time": 1690949753062,
    "enabled_time": 1690948666777,
    "notification": {
      "channel": {
        "id": "qR9mVYgBRnO25hGO-KYg"
      },
      "conditions": {
        "creation": true,
        "deletion": true,
        "failure": true,
        "time_limit_exceeded": false
      }
    }
  }
}

Hi Gsmitt, thanks for the response… I am using Opensearch Distro 2.5. Hope that helps!

Hey @jackbotsplash

I havent fully tested this out yet. It seems that both the policy creation and deletion are experiencing issues, with the latest execution of the policy creation and deletion both resulting in a “FAILED” status. It is unclear why these failures occurred based on the provided information, by chance do you see anything in the logs when failure occurs?

Maybe I over looked those settings.
Did you use the Web UI to create the Snapshot policy? Was there any updates or configuration made prior to this issue?

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