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

More graceful logging for main controller #77

Open
vbnrh opened this issue Feb 24, 2022 · 0 comments · May be fixed by #100
Open

More graceful logging for main controller #77

vbnrh opened this issue Feb 24, 2022 · 0 comments · May be fixed by #100

Comments

@vbnrh
Copy link
Member

vbnrh commented Feb 24, 2022


github.com/red-hat-storage/odf-multicluster-orchestrator/controllers.(*MirrorPeerSecretReconciler).Reconcile
	/workspace/controllers/mirrorpeersecret_controller.go:53
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:298
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:253
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:214
2022-02-24T10:38:51.924Z	ERROR	controller-runtime.manager.controller.secret	Reconciler error	{"reconciler group": "", "reconciler kind": "Secret", "name": "756bd87b55371f0a9a791269d78efdaeb2617fc", "namespace": "spoke-cluster", "error": "namespaces \"openshift-dr-system\" not found"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:253
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:214
2022-02-24T10:38:51.945Z	INFO	controller-runtime.manager.controller.secret	Creating a s3 secret	{"reconciler group": "", "reconciler kind": "Secret", "name": "756bd87b55371f0a9a791269d78efdaeb2617fc", "namespace": "spoke-cluster", "secret": {"metadata":{"name":"756bd87b55371f0a9a791269d78efdaeb2617fc","namespace":"openshift-dr-system","creationTimestamp":null,"labels":{"multicluster.odf.openshift.io/created-by":"mirrorpeersecret"}},"data":{"AWS_ACCESS_KEY_ID":"SE9tMElmQXA1ZDJxVWhhQ1dnUDQ=","AWS_SECRET_ACCESS_KEY":"bXRsK2c3cnA1Vzl6TjlQdmQ3aDlnWEw4SStmQUZqRHgrWDFRM08vaA=="},"type":"Opaque"}}
2022-02-24T10:38:52.000Z	ERROR	controller-runtime.manager.controller.secret	Updating the secret from internal secret is failed	{"reconciler group": "", "reconciler kind": "Secret", "name": "756bd87b55371f0a9a791269d78efdaeb2617fc", "namespace": "spoke-cluster", "controller": "MirrorPeerSecret", "secret": {"kind":"Secret","apiVersion":"v1","metadata":{"name":"756bd87b55371f0a9a791269d78efdaeb2617fc","namespace":"spoke-cluster","uid":"1a612df7-feb2-43e8-97d5-e05b5a6aaa3c","resourceVersion":"308664","creationTimestamp":"2022-02-24T10:38:51Z","labels":{"multicluster.odf.openshift.io/secret-type":"INTERNAL"},"managedFields":[{"manager":"manager","operation":"Update","apiVersion":"v1","time":"2022-02-24T10:38:51Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:namespace":{},"f:secret-data":{},"f:secret-origin":{},"f:storage-cluster-name":{}},"f:metadata":{"f:labels":{".":{},"f:multicluster.odf.openshift.io/secret-type":{}}},"f:type":{}}}]},"data":{"namespace":"b3BlbnNoaWZ0LXN0b3JhZ2U=","secret-data":"ey...
github.com/red-hat-storage/odf-multicluster-orchestrator/controllers.(*MirrorPeerSecretReconciler).Reconcile
	/workspace/controllers/mirrorpeersecret_controller.go:53
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:298
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:253
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:214
2022-02-24T10:38:52.000Z	ERROR	controller-runtime.manager.controller.secret	Reconciler error	{"reconciler group": "", "reconciler kind": "Secret", "name": "756bd87b55371f0a9a791269d78efdaeb2617fc", "namespace": "spoke-cluster", "error": "namespaces \"openshift-dr-system\" not found"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:253
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:214
2022-02-24T10:38:52.041Z	INFO	controller-runtime.manager.controller.secret	Creating a s3 secret	{"reconciler group": "", "reconciler kind": "Secret", "name": "756bd87b55371f0a9a791269d78efdaeb2617fc", "namespace": "spoke-cluster", "secret": {"metadata":{"name":"756bd87b55371f0a9a791269d78efdaeb2617fc","namespace":"openshift-dr-system","creationTimestamp":null,"labels":{"multicluster.odf.openshift.io/created-by":"mirrorpeersecret"}},"data":
2022-02-24T10:38:52.098Z	ERROR	controller-runtime.manager.controller.secret	Updating the secret from internal secret is failed	{"reconciler group": "", "reconciler kind": "Secret", "name": "756bd87b55371f0a9a791269d78efdaeb2617fc", "namespace": "spoke-cluster", "controller": "MirrorPeerSecret", "secret": {"kind":"Secret","apiVersion":"v1","metadata":{"name":"756bd87b55371f0a9a791269d78efdaeb2617fc","namespace":"spoke-cluster","uid":"1a612df7-feb2-43e8-97d5-e05b5a6aaa3c","resourceVersion":"308664","creationTimestamp":"2022-02-24T10:38:51Z","labels":{"multicluster.odf.openshift.io/secret-type":"INTERNAL"},"managedFields":[{"manager":"manager","operation":"Update","apiVersion":"v1","time":"2022-02-24T10:38:51Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:namespace":{},"f:secret-data":{},"f:secret-origin":{},"f:storage-cluster-name":{}},"f:metadata":{"f:labels":{".":{},"f:multicluster.odf.openshift.io/secret-type":{}}},"f:type":{}}}]},"data":{"namespace":"b3BlbnNoaWZ0LXN0b3JhZ2U=","secret-data":"ey...
github.com/red-hat-storage/odf-multicluster-orchestrator/controllers.(*MirrorPeerSecretReconciler).Reconcile
	/workspace/controllers/mirrorpeersecret_controller.go:53
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:298
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:253
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.6/pkg/internal/controller/controller.go:214

The main odf controller continously tries to create the s3 secrets and the code fails as the namespace openshift-dr-system is not found .

Need to implement in code to fail gracefully whenever performing crud operations on resources and not pollute the main controller logs

@weirdwiz weirdwiz linked a pull request Apr 11, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant