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

Unable to create OpenSearchISMPolicy with allocation #876

Open
vinodhreddyg opened this issue Oct 4, 2024 · 2 comments
Open

Unable to create OpenSearchISMPolicy with allocation #876

vinodhreddyg opened this issue Oct 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@vinodhreddyg
Copy link

What is the bug?

Unable to create OpenSearchISMPolicy with allocation and its childs

 - allocation:
      exclude: hot
      include: warm
      require: warm
      waitFor: "false"

Opensearch rest API is expecting it as an object for require but in the CRD it is expecting string

CRD ref https://github.com/opensearch-project/opensearch-k8s-operator/blob/main/charts/opensearch-operator/files/opensearch.opster.io_opensearchismpolicies.yaml#L191

How can one reproduce the bug?

Create OpenSearchISMPolicy CR with allocation and its child

What is the expected behavior?

Create OpenSearchISMPolicy without any errors

Operator logs

{"level":"error","ts":"2024-10-04T20:10:53.651Z","msg":"failed to create ism policy","controller":"opensearchismpolicy","controllerGroup":"opensearch.opster.io","controllerKind":"OpenSearchISMPolicy","OpenSearchISMPolicy":{"name":"default-ism-policy","namespace":"sbospe-vg-os3"},"namespace":"sbospe-vg-os3","name":"default-ism-policy","reconcileID":"018ed4ff-4482-4537-91d5-40718f72b103","reconciler":"ismpolicy","error":"failed to create ism policy: [400 Bad Request] {\"error\":{\"root_cause\":[{\"type\":\"parsing_exception\",\"reason\":\"Failed to parse object: expecting token of type [START_OBJECT] but found [VALUE_STRING]\",\"line\":1,\"col\":579}],\"type\":\"parsing_exception\",\"reason\":\"Failed to parse object: expecting token of type [START_OBJECT] but found [VALUE_STRING]\",\"line\":1,\"col\":579},\"status\":400}","stacktrace":"github.com/Opster/opensearch-k8s-operator/opensearch-operator/pkg/reconcilers.(*IsmPolicyReconciler).Reconcile\n\t/workspace/pkg/reconcilers/ismpolicy.go:209\ngithub.com/Opster/opensearch-k8s-operator/opensearch-operator/controllers.(*OpensearchISMPolicyReconciler).Reconcile\n\t/workspace/controllers/opensearchism_controller.go:53\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:118\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:314\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:265\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:226"}
@vinodhreddyg vinodhreddyg added bug Something isn't working untriaged Issues that have not yet been triaged labels Oct 4, 2024
@gaiksaya
Copy link
Member

Similar issue is open here: #829

@gaiksaya gaiksaya removed the untriaged Issues that have not yet been triaged label Oct 10, 2024
@prudhvigodithi
Copy link
Member

Hey @vinodhreddyg can you please try with the config as posted here #829 (comment)?
@swoehrl-mw @getsaurabh02

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
Status: 📦 Backlog
Development

No branches or pull requests

3 participants