Skip to content

[BUG] Cannot change snapshot policy repository #1311

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

Open
opoplawski opened this issue Apr 15, 2025 · 2 comments
Open

[BUG] Cannot change snapshot policy repository #1311

opoplawski opened this issue Apr 15, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@opoplawski
Copy link

Describe the bug

I have the following snapshot policy that references a repository that no longer exists:

Image

However when I go to edit it, the repository shows as the one that does exist:

Image

but when it runs it fails due to the missing repository:

org.opensearch.repositories.RepositoryMissingException: [my-fs-repository] missing

OpenSearch Version
2.19.1

Dashboards Version
2.19.1

Host/Environment (please complete the following information):*

  • OS: AlmaLinux 8.10
  • Browser and version Firefox 128.9.0

Additional context

I deleted the previously existing my-fs-repository and replaced it with osnap without changing the policy. Then tried to change the policy to use osnap but apparently that does not take.

@opoplawski opoplawski added bug Something isn't working untriaged labels Apr 15, 2025
@opoplawski
Copy link
Author

I'm trying to update the policy manually with:

POST _plugins/_sm/policies/weekly-snapshot?if_seq_no=555416069&if_primary_term=165
{
     "description": "",
    "creation": {
      "schedule": {
        "cron": {
          "expression": "0 20 * * *",
          "timezone": "America/Los_Angeles"
        }
      }
    },
    "deletion": {
      "schedule": {
        "cron": {
          "expression": "0 20 * * *",
          "timezone": "America/Los_Angeles"
        }
      },
      "condition": {
        "max_age": "90d",
        "min_count": 1
      }
    },
    "snapshot_config": {
      "indices": "*",
      "repository": "ossnap"
    },
    "schedule": {
      "interval": {
        "start_time": 1741384319134,
        "period": 1,
        "unit": "Minutes"
      }
    },
    "enabled": true,
    "enabled_time": 1741384319134,
    "notification": {
      "channel": {
        "id": "pkdMoIQB258lWkadmxhy"
      },
      "conditions": {
        "creation": true,
        "deletion": false,
        "failure": true,
        "time_limit_exceeded": false
      }
    }

}

but I get:

{
  "error": {
    "root_cause": [
      {
        "type": "version_conflict_engine_exception",
        "reason": "[weekly-snapshot-sm-policy]: version conflict, document already exists (current version [6])",
        "index": ".opendistro-ism-config",
        "shard": "0",
        "index_uuid": "z-iBx5nrRPKZm1wRXH-iUQ"
      }
    ],
    "type": "version_conflict_engine_exception",
    "reason": "[weekly-snapshot-sm-policy]: version conflict, document already exists (current version [6])",
    "index": ".opendistro-ism-config",
    "shard": "0",
    "index_uuid": "z-iBx5nrRPKZm1wRXH-iUQ"
  },
  "status": 409
}

@Hailong-am Hailong-am transferred this issue from opensearch-project/OpenSearch-Dashboards May 13, 2025
@andrross
Copy link
Member

Catch All Triage - 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants