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] OpenSearchComponentTemplate resources are constantly reconciled #799

Closed
Capitrium opened this issue May 3, 2024 · 0 comments · Fixed by #809
Closed

[BUG] OpenSearchComponentTemplate resources are constantly reconciled #799

Capitrium opened this issue May 3, 2024 · 0 comments · Fixed by #809
Labels
bug Something isn't working untriaged Issues that have not yet been triaged

Comments

@Capitrium
Copy link
Contributor

What is the bug?

OpenSearchComponentTemplate resources are constantly reconciled. I suspect the issue is a difference in the sorting order for fields in the CRD compared to what is returned from the OpenSearch API, as was discussed here and addressed in #727 for OpenSearchIndexTemplates.

How can one reproduce the bug?

Create the following OpenSearchComponentTemplate:

apiVersion: opensearch.opster.io/v1
kind: OpensearchComponentTemplate
metadata:
  name: test-component-template
spec:
  opensearchCluster:
    name: my-cluster
  name: test-component-template
  template:
    mappings:
      properties:
        first:
          type: "long"
        second:
          type: "long"
        third:
          type: "long"

What is the expected behavior?

OpenSearchComponentTemplate resources should not constantly require updates.

Do you have any additional context?

Logs:

$ kubectl describe opensearchcomponenttemplate test-component-template
...
Events:
  Type    Reason                Age                From                          Message
  ----    ------                ----               ----                          -------
  Normal  OpensearchAPIUpdated  14s (x5 over 74s)  componenttemplate-controller  component template updated in opensearch
$ kubectl logs -n opensearch-system opensearch-operator-controller-manager-657b55b646-6zdlz -c operator-controller-manager -f | grep test-component-template
...
{"level":"info","ts":"2024-05-03T19:53:31.011Z","msg":"OpenSearch Component template requires update","controller":"opensearchcomponenttemplate","controllerGroup":"opensearch.opster.io","controllerKind":"OpensearchComponentTemplate","OpensearchComponentTemplate":{"name":"test-component-template","namespace":"logging"},"namespace":"logging","name":"test-component-template","reconcileID":"72adb79f-550d-422b-85a8-cc292244baee"}
{"level":"info","ts":"2024-05-03T19:54:01.022Z","msg":"Reconciling OpensearchComponentTemplate","controller":"opensearchcomponenttemplate","controllerGroup":"opensearch.opster.io","controllerKind":"OpensearchComponentTemplate","OpensearchComponentTemplate":{"name":"test-component-template","namespace":"logging"},"namespace":"logging","name":"test-component-template","reconcileID":"36c0e442-f485-4368-9d49-533f38bbe755","componenttemplate":{"name":"test-component-template","namespace":"logging"}}
{"level":"info","ts":"2024-05-03T19:54:01.052Z","msg":"OpenSearch Component template requires update","controller":"opensearchcomponenttemplate","controllerGroup":"opensearch.opster.io","controllerKind":"OpensearchComponentTemplate","OpensearchComponentTemplate":{"name":"test-component-template","namespace":"logging"},"namespace":"logging","name":"test-component-template","reconcileID":"36c0e442-f485-4368-9d49-533f38bbe755"}
{"level":"info","ts":"2024-05-03T19:54:31.063Z","msg":"Reconciling OpensearchComponentTemplate","controller":"opensearchcomponenttemplate","controllerGroup":"opensearch.opster.io","controllerKind":"OpensearchComponentTemplate","OpensearchComponentTemplate":{"name":"test-component-template","namespace":"logging"},"namespace":"logging","name":"test-component-template","reconcileID":"a2ddbd02-9024-4e20-97e5-47ac97ff4c24","componenttemplate":{"name":"test-component-template","namespace":"logging"}}
{"level":"info","ts":"2024-05-03T19:54:31.092Z","msg":"OpenSearch Component template requires update","controller":"opensearchcomponenttemplate","controllerGroup":"opensearch.opster.io","controllerKind":"OpensearchComponentTemplate","OpensearchComponentTemplate":{"name":"test-component-template","namespace":"logging"},"namespace":"logging","name":"test-component-template","reconcileID":"a2ddbd02-9024-4e20-97e5-47ac97ff4c24"}
{"level":"info","ts":"2024-05-03T19:55:01.101Z","msg":"Reconciling OpensearchComponentTemplate","controller":"opensearchcomponenttemplate","controllerGroup":"opensearch.opster.io","controllerKind":"OpensearchComponentTemplate","OpensearchComponentTemplate":{"name":"test-component-template","namespace":"logging"},"namespace":"logging","name":"test-component-template","reconcileID":"a94606ec-1708-4367-9feb-aa368783b243","componenttemplate":{"name":"test-component-template","namespace":"logging"}}
{"level":"info","ts":"2024-05-03T19:55:01.136Z","msg":"OpenSearch Component template requires update","controller":"opensearchcomponenttemplate","controllerGroup":"opensearch.opster.io","controllerKind":"OpensearchComponentTemplate","OpensearchComponentTemplate":{"name":"test-component-template","namespace":"logging"},"namespace":"logging","name":"test-component-template","reconcileID":"a94606ec-1708-4367-9feb-aa368783b243"}
{"level":"info","ts":"2024-05-03T19:55:31.147Z","msg":"Reconciling OpensearchComponentTemplate","controller":"opensearchcomponenttemplate","controllerGroup":"opensearch.opster.io","controllerKind":"OpensearchComponentTemplate","OpensearchComponentTemplate":{"name":"test-component-template","namespace":"logging"},"namespace":"logging","name":"test-component-template","reconcileID":"f74b1812-af71-4e7d-9f09-61c7f7708456","componenttemplate":{"name":"test-component-template","namespace":"logging"}}
{"level":"info","ts":"2024-05-03T19:55:31.178Z","msg":"OpenSearch Component template requires update","controller":"opensearchcomponenttemplate","controllerGroup":"opensearch.opster.io","controllerKind":"OpensearchComponentTemplate","OpensearchComponentTemplate":{"name":"test-component-template","namespace":"logging"},"namespace":"logging","name":"test-component-template","reconcileID":"f74b1812-af71-4e7d-9f09-61c7f7708456"}
{"level":"info","ts":"2024-05-03T19:56:01.189Z","msg":"Reconciling OpensearchComponentTemplate","controller":"opensearchcomponenttemplate","controllerGroup":"opensearch.opster.io","controllerKind":"OpensearchComponentTemplate","OpensearchComponentTemplate":{"name":"test-component-template","namespace":"logging"},"namespace":"logging","name":"test-component-template","reconcileID":"d0f553e9-bc2c-43e8-ab3f-85b28691ea03","componenttemplate":{"name":"test-component-template","namespace":"logging"}}
...
@Capitrium Capitrium added bug Something isn't working untriaged Issues that have not yet been triaged labels May 3, 2024
swoehrl-mw pushed a commit that referenced this issue May 13, 2024
#809)

### Description
This fixes the same issue that previously existed with
`OpenSearchIndexTemplate` resources (#731), which was fixed in #727 but
did not apply the fix to `OpenSearchComponentTemplate` resources.

### Issues Resolved
Fixes #799 

### Check List
- [x] Commits are signed per the DCO using --signoff 
- [ ] Unittest added for the new/changed functionality and all unit
tests are successful
- [ ] Customer-visible features documented
- [x] No linter warnings (`make lint`)

If CRDs are changed:
- [ ] CRD YAMLs updated (`make manifests`) and also copied into the helm
chart
- [ ] Changes to CRDs documented

Please refer to the [PR
guidelines](https://github.com/opensearch-project/opensearch-k8s-operator/blob/main/docs/developing.md#submitting-a-pr)
before submitting this pull request.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and
signing off your commits, please check
[here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

Signed-off-by: Zack Brenton <[email protected]>
swoehrl-mw pushed a commit to swoehrl-mw/opensearch-k8s-operator that referenced this issue May 16, 2024
opensearch-project#809)

### Description
This fixes the same issue that previously existed with
`OpenSearchIndexTemplate` resources (opensearch-project#731), which was fixed in opensearch-project#727 but
did not apply the fix to `OpenSearchComponentTemplate` resources.

### Issues Resolved
Fixes opensearch-project#799

### Check List
- [x] Commits are signed per the DCO using --signoff
- [ ] Unittest added for the new/changed functionality and all unit
tests are successful
- [ ] Customer-visible features documented
- [x] No linter warnings (`make lint`)

If CRDs are changed:
- [ ] CRD YAMLs updated (`make manifests`) and also copied into the helm
chart
- [ ] Changes to CRDs documented

Please refer to the [PR
guidelines](https://github.com/opensearch-project/opensearch-k8s-operator/blob/main/docs/developing.md#submitting-a-pr)
before submitting this pull request.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and
signing off your commits, please check
[here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

Signed-off-by: Zack Brenton <[email protected]>
(cherry picked from commit f38eb26)
swoehrl-mw pushed a commit that referenced this issue Jun 18, 2024
#809)

### Description
This fixes the same issue that previously existed with
`OpenSearchIndexTemplate` resources (#731), which was fixed in #727 but
did not apply the fix to `OpenSearchComponentTemplate` resources.

### Issues Resolved
Fixes #799

### Check List
- [x] Commits are signed per the DCO using --signoff
- [ ] Unittest added for the new/changed functionality and all unit
tests are successful
- [ ] Customer-visible features documented
- [x] No linter warnings (`make lint`)

If CRDs are changed:
- [ ] CRD YAMLs updated (`make manifests`) and also copied into the helm
chart
- [ ] Changes to CRDs documented

Please refer to the [PR
guidelines](https://github.com/opensearch-project/opensearch-k8s-operator/blob/main/docs/developing.md#submitting-a-pr)
before submitting this pull request.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and
signing off your commits, please check
[here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

Signed-off-by: Zack Brenton <[email protected]>
(cherry picked from commit f38eb26)
swoehrl-mw pushed a commit to MaibornWolff/opensearch-operator that referenced this issue Jul 2, 2024
opensearch-project#809)

### Description
This fixes the same issue that previously existed with
`OpenSearchIndexTemplate` resources (opensearch-project#731), which was fixed in opensearch-project#727 but
did not apply the fix to `OpenSearchComponentTemplate` resources.

### Issues Resolved
Fixes opensearch-project#799

### Check List
- [x] Commits are signed per the DCO using --signoff
- [ ] Unittest added for the new/changed functionality and all unit
tests are successful
- [ ] Customer-visible features documented
- [x] No linter warnings (`make lint`)

If CRDs are changed:
- [ ] CRD YAMLs updated (`make manifests`) and also copied into the helm
chart
- [ ] Changes to CRDs documented

Please refer to the [PR
guidelines](https://github.com/opensearch-project/opensearch-k8s-operator/blob/main/docs/developing.md#submitting-a-pr)
before submitting this pull request.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and
signing off your commits, please check
[here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

Signed-off-by: Zack Brenton <[email protected]>
(cherry picked from commit f38eb26)
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
1 participant