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] ISM policy "allocation" not working through CRD #812

Open
fbegyn opened this issue May 14, 2024 · 0 comments
Open

[BUG] ISM policy "allocation" not working through CRD #812

fbegyn opened this issue May 14, 2024 · 0 comments
Labels
bug Something isn't working untriaged Issues that have not yet been triaged

Comments

@fbegyn
Copy link

fbegyn commented May 14, 2024

What is the bug?

This might very well be user error or missing documentation, but I can't figure out how to get the ISM allocation action to work within the CRD. For example the "hot/cold" strategy implementation would be a good thing to fully document and show how it works.

operator-controller-manager {"level":"error","ts":"2024-05-14T09:23:42.939Z","msg":"Reconciler error","controller":"opensearchismpolicy","controllerGroup":"opensearch.opster.io","controllerKind":"OpenSearchISMPolicy","OpenSearchISMPolicy":{"name":"all-logs-allocation","namespace":"logging"},"namespace":"logging","name":"all-logs-allocation","reconcileID":"cf9c0524-34af-4c98-b6dd-432592ed8eea","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\":190}],\"type\":\"parsing_exception\",\"reason\":\"Failed to parse object: expecting token of type [START_OBJECT] but found [VALUE_STRING]\",\"line\":1,\"col\":190},\"status\":400}","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:324\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/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/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:226"}

I have a feeling this is the porting from the allocation docs where the type is string and the had validation in the operator to expect a string, instead of a map[string]string (which would offer support for the YAML tree structure in the docs).

How can one reproduce the bug?

Attempt to create an OpenSearchISMPolicy with the allocation action:

      actions:
        - allocation:
            require:
              "temp": "hot"
            include: ""
            exclude: ""
            waitFor: "false"

What is the expected behavior?

The ISM policy definitions behave like expected with the Opensearch API as documented https://opensearch.org/docs/latest/im-plugin/ism/policies/#allocation .

What is your host/environment?

Kubernetes 1.27

@fbegyn fbegyn added bug Something isn't working untriaged Issues that have not yet been triaged labels May 14, 2024
@fbegyn fbegyn changed the title [BUG] [BUG] ISM policy "allocation" not working through CRD May 14, 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 untriaged Issues that have not yet been triaged
Projects
None yet
Development

No branches or pull requests

1 participant