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

Check OperandRegistry when checking no-op operators #1807

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

Daniel-Fan
Copy link
Contributor

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

Found an issue when doing a fresh install CPFS in simple topology.

CS operator is trying to check if OperandRegistry has any no-op operator requested before cleaning any NSS resources. However, OperandRegistry is not present yet in fresh installation.

E0221 03:26:42.996735       1 init.go:1191] Failed to get common-service OperandRegistry: no matches for kind "OperandRegistry" in version "operator.ibm.com/v1alpha1"
E0221 03:26:42.996810       1 init.go:164] Failed to clean NamespaceScope resources: no matches for kind "OperandRegistry" in version "operator.ibm.com/v1alpha1"
E0221 03:26:42.996836       1 commonservice_controller.go:229] Failed to initialize resources: no matches for kind "OperandRegistry" in version "operator.ibm.com/v1alpha1"
E0221 03:26:43.005957       1 commonservice_controller.go:233] Fail to reconcile ibm-common-services/common-service: no matches for kind "OperandRegistry" in version "operator.ibm.com/v1alpha1"
2024-02-21T03:26:43.006Z	ERROR	controller.commonservice	Reconciler error	{"reconciler group": "operator.ibm.com", "reconciler kind": "CommonService", "name": "common-service", "namespace": "ibm-common-services", "error": "no matches for kind \"OperandRegistry\" in version \"operator.ibm.com/v1alpha1\""}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.10.0/pkg/internal/controller/controller.go:227

After the update, CS operator will check if OperandRegistry CRD exists or not. If it is not there, it will skip the no-op operator check, and continue NSS cleanup.

I0221 03:48:33.018747 1 init.go:1192] OperandRegistry CRD does not exist, skip checking no-op installMode
I0221 03:48:33.119799 1 init.go:1233] The ibm-namespace-scope-operator subscription is not found in the 4-5-test namespace, skip cleaning up

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

@ibm-ci-bot ibm-ci-bot merged commit 4b30043 into IBM:master Feb 21, 2024
6 of 9 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