Bug 2002961
Summary: | CSR reconciler report error constantly when BYOH CSR approved by other Approver | |||
---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | gaoshang <sgao> | |
Component: | Windows Containers | Assignee: | Mansi Kulkarni <mankulka> | |
Status: | CLOSED ERRATA | QA Contact: | Ronnie Rasouli <rrasouli> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 4.9 | CC: | aos-bugs, jspeed, mankulka, mohashai, team-winc | |
Target Milestone: | --- | |||
Target Release: | 4.10.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | No Doc Update | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 2003788 2008942 (view as bug list) | Environment: | ||
Last Closed: | 2022-03-28 09:36:28 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 2008942 |
Description
gaoshang
2021-09-10 08:54:57 UTC
@sgao are you talking about cluster-machine-approver [0] when you say node CSR approver? What we need to figure out is why the node CSR approver approved a BYOH node as they use check for a node link with a Machine before approving. So it could point to an issue with cluster-machine-approver. [0] https://github.com/openshift/cluster-machine-approver/ Yes, I think so. I got the name `Node CSR Approver` from following csr info: # oc get csr csr-ctlst -oyaml ... conditions: - lastTransitionTime: "2021-09-10T06:52:16Z" lastUpdateTime: "2021-09-10T06:52:16Z" message: This CSR was approved by the Node CSR Approver reason: NodeCSRApprove status: "True" type: Approved Here I have another cluster with this bug, found it's(csr csr-nqbh7) approved by openshift-cluster-machine-approver. # oc logs deployment.apps/machine-approver machine-approver-controller -n openshift-cluster-machine-approver | grep "csr-nqbh7" I0911 02:55:19.980810 1 controller.go:114] Reconciling CSR: csr-nqbh7 I0911 02:55:19.991065 1 csr_check.go:150] csr-nqbh7: CSR does not appear to be client csr I0911 02:55:20.014731 1 controller.go:179] CSR csr-nqbh7 approved 2021-09-11T03:50:40.409Z DEBUG wc 10.0.61.32 initializing SSH connection 2021-09-11T03:50:40.882Z DEBUG wc 10.0.61.32 run {"cmd": "powershell.exe -NonInteractive -ExecutionPolicy Bypass hostname", "out": "sgao-win1\r\n"} 2021-09-11T03:50:40.887Z ERROR controller-runtime.manager.controller.certificatesigningrequest Reconciler error {"reconciler group": "certificates.k8s.io", "reconciler kind": "CertificateSigningRequest", "name": "csr-nqbh7", "namespace": "", "error": "WMCO CSR Approver could not approve csr-nqbh7 CSR: could not update conditions for approval CSR: csr-nqbh7: CertificateSigningRequest.certificates.k8s.io \"csr-nqbh7\" is invalid: status.conditions[1].type: Duplicate value: \"Approved\"", "errorVerbose": "CertificateSigningRequest.certificates.k8s.io \"csr-nqbh7\" is invalid: status.conditions[1].type: Duplicate value: \"Approved\"\ncould not update conditions for approval CSR: csr-nqbh7\ngithub.com/openshift/windows-machine-config-operator/pkg/csr.(*Approver).Approve\n\t/build/windows-machine-config-operator/pkg/csr/csr.go:99\ngithub.com/openshift/windows-machine-config-operator/controllers.(*certificateSigningRequestsReconciler).reconcileCSR\n\t/build/windows-machine-config-operator/controllers/certificatesigningrequests_controller.go:96\ngithub.com/openshift/windows-machine-config-operator/controllers.(*certificateSigningRequestsReconciler).Reconcile\n\t/build/windows-machine-config-operator/controllers/certificatesigningrequests_controller.go:86\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/build/windows-machine-config-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/build/windows-machine-config-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/build/windows-machine-config-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:214\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1371\nWMCO CSR Approver could not approve csr-nqbh7 CSR\ngithub.com/openshift/windows-machine-config-operator/controllers.(*certificateSigningRequestsReconciler).reconcileCSR\n\t/build/windows-machine-config-operator/controllers/certificatesigningrequests_controller.go:97\ngithub.com/openshift/windows-machine-config-operator/controllers.(*certificateSigningRequestsReconciler).Reconcile\n\t/build/windows-machine-config-operator/controllers/certificatesigningrequests_controller.go:86\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/build/windows-machine-config-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/build/windows-machine-config-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/build/windows-machine-config-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:214\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1371"} sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem /build/windows-machine-config-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:253 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2 /build/windows-machine-config-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:214 This bug has been verified on OCP 4.10.0-0.nightly-2021-09-23-210724 and passed, thanks. Steps: Wait after the renewed CSR issued, CSR reconciler did not report error anymore and filter by checking CSR status # oc logs deployment.apps/windows-machine-config-operator -n openshift-windows-machine-config-operator | grep "SR is already approved" 2021-09-25T02:56:37.217Z INFO controllers.CertificateSigningRequests CSR is already approved/denied {"Name": "system:openshift:openshift-authenticator-69dgg"} 2021-09-25T07:16:39.142Z INFO controllers.CertificateSigningRequests CSR is already approved/denied {"Name": "system:openshift:openshift-monitoring-z46bl"} Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Windows Container Support for Red Hat OpenShift 5.0.0 [security update]), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:0577 |