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

[BUG] Get policies misses policy #1194

Open
Jakob3xD opened this issue Jun 18, 2024 · 1 comment
Open

[BUG] Get policies misses policy #1194

Jakob3xD opened this issue Jun 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Jakob3xD
Copy link

What is the bug?
I one of my Opensearch Clusters I have 21 policies but the GET _plugins/_ism/policies counts 21 policies and only returns 20 policies. It omits one specific policy with the name shrink_delete. I can get, update, delete and recreate the policy. I can also use it but it wont show up in the reponse of the API get request. It seems like it is cached some where causing this issue.
Even deleting the .opendistro-ism-config and recreating all policies did not help.
A full cluster restart did not help. What I found odd, is the fact that the opensearch dashboard returns the policy when calling https://your-dashobard.exampley/api/ism/policies?from=0&size=100&search=&sortField=id&sortDirection=desc.

This issues i causing my custom tool to fail, as it does not expect the shrink_delete policy to exist and therefore does not habe a seq_no and primary_term.

How can one reproduce the bug?
I don't think there is a way to reproduce it in a simple way.

What is the expected behavior?
I would expect that 21 policies are getting returned.

What is your host/environment?

  • OS: Ubuntu
  • Version 24.04
  • All default plugins + s3
  • Opensearch Version 2.13
  • 6 Node Cluster

Do you have any screenshots?

{
  "policies": [
    {
      "_id": "archive-delete-365d",
      "_seq_no": 13907,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "archive-delete-365d-bmc",
      "_seq_no": 443,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "archive-delete-365d-gibber",
      "_seq_no": 444,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "archive-delete-365d-qemu-events",
      "_seq_no": 441,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "archive-delete-365d-qemu-instance",
      "_seq_no": 440,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "archive-delete-365d-trainman",
      "_seq_no": 442,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "cleanup_14d",
      "_seq_no": 13890,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "cleanup_2d",
      "_seq_no": 13891,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "cleanup_30d",
      "_seq_no": 13892,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "cleanup_365d",
      "_seq_no": 13893,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "cleanup_90d",
      "_seq_no": 13894,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "cleanup_9d",
      "_seq_no": 13895,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "datastream_14d",
      "_seq_no": 13902,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "datastream_30d",
      "_seq_no": 13901,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "datastream_60d",
      "_seq_no": 13903,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "datastream_8d",
      "_seq_no": 13900,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "datastream_90d",
      "_seq_no": 13904,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "datastream_snapshot",
      "_seq_no": 13905,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "rollover_delete",
      "_seq_no": 13896,
      "_primary_term": 4,
      "policy": {...}
    },
    {
      "_id": "rollover_merge",
      "_seq_no": 13898,
      "_primary_term": 4,
      "policy": {...}
    }
  ],
  "total_policies": 21
}
@Jakob3xD Jakob3xD added bug Something isn't working untriaged labels Jun 18, 2024
@dblock
Copy link
Member

dblock commented Jul 8, 2024

[Catch All Triage, attendees 1, 2, 3, 4, 5, 6, 7]

@dblock dblock removed the untriaged label Jul 8, 2024
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