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

Skip OperandRequest for OperandBindinfo if the OperandRequest is in the deletion status #1018

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

Daniel-Fan
Copy link
Contributor

@Daniel-Fan Daniel-Fan commented Feb 21, 2024

issue: https://github.ibm.com/IBMPrivateCloud/roadmap/issues/61333

Context

When ODLM reconciles OperandBindinfo to copy ConfigMap/Secret to namespaces where the OperandRequests are located, it also counts the namespace that are being deleted. However, ODLM is not able to create any new ConfigMap/Secret in a namespace which is be terminating.

E1122 11:17:23.547665       1 operandbindinfo_controller.go:237] failed to reconcile the OperandBindinfo ibm-common-services/keycloak-bindinfo: the following errors occurred:
  - failed to create ConfigMap cp4i-e2e-general-joy/cs-keycloak-service: configmaps "keycloak-bindinfo-cs-keycloak-service" is forbidden: unable to create new content in namespace cp4i-e2e-general-joy because it is being terminated

Test

After applying the new image quay.io/opencloudio/odlm:0ac0bd84-dirty in ODLM CSV and deleting one namespace cp4i-2 with an OperandRequest hanging, ODLM will skip that OperandRequest because it is being deleted.

I0221 18:27:20.715071 1 operandbindinfo_controller.go:453] Configmap cs-keycloak-route is copied from the namespace ibm-common-services to the namespace cp4i-3
I0221 18:27:20.723951 1 operandbindinfo_controller.go:453] Configmap cs-keycloak-service is copied from the namespace ibm-common-services to the namespace cp4i-3
I0221 18:27:20.735585 1 operandbindinfo_controller.go:351] Secret cs-keycloak-tls-secret is copied from the namespace ibm-common-services to secret keycloak-bindinfo-cs-keycloak-tls-secret in the namespace cp4i-3
I0221 18:27:20.744144 1 operandbindinfo_controller.go:453] Configmap cs-keycloak-route is copied from the namespace ibm-common-services to the namespace cp4i
I0221 18:27:20.752546 1 operandbindinfo_controller.go:453] Configmap cs-keycloak-service is copied from the namespace ibm-common-services to the namespace cp4i
I0221 18:27:20.762434 1 operandbindinfo_controller.go:351] Secret cs-keycloak-tls-secret is copied from the namespace ibm-common-services to secret keycloak-bindinfo-cs-keycloak-tls-secret in the namespace cp4i
W0221 18:27:20.762470 1 operandbindinfo_controller.go:183] OperandRequest cp4i-2/example-service is being deleted, skip the OperandBindInfo ibm-common-services/keycloak-bindinfo

…he deletion status

Signed-off-by: Daniel Fan <fanyuchensx@gmail.com>
Copy link
Contributor

@YCShen1010 YCShen1010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@ibm-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Daniel-Fan, YCShen1010

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Daniel-Fan,YCShen1010]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Daniel-Fan
Copy link
Contributor Author

/retest

@ibm-ci-bot ibm-ci-bot merged commit 5a98d87 into IBM:master Feb 22, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants