Bug 2040710 - cluster-baremetal-operator cannot update BMC subscription CR
Summary: cluster-baremetal-operator cannot update BMC subscription CR
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.10
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.10.0
Assignee: Honza Pokorny
QA Contact: Ori Michaeli
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-14 15:29 UTC by Honza Pokorny
Modified: 2022-03-10 16:39 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:39:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-baremetal-operator pull 235 0 None open Bug 2040710: Pluralize BMC subscription CR name in RBAC 2022-01-14 15:38:42 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:39:54 UTC

Description Honza Pokorny 2022-01-14 15:29:32 UTC
bmceventsubscriptions.metal3.io "sub-01" is forbidden: User "system:serviceaccount:openshift-machine-api:cluster-baremetal-operator" cannot update resource "bmceventsubscriptions/status" in API group "metal3.io" in the namespace "openshift-machine-api"
failed to update subscription status
github.com/metal3-io/baremetal-operator/controllers/metal3%2eio.(*BMCEventSubscriptionReconciler).handleError
        /go/src/github.com/metal3-io/baremetal-operator/controllers/metal3.io/bmceventsubscription_controller.go:137
github.com/metal3-io/baremetal-operator/controllers/metal3%2eio.(*BMCEventSubscriptionReconciler).Reconcile
        /go/src/github.com/metal3-io/baremetal-operator/controllers/metal3.io/bmceventsubscription_controller.go:118
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
        /go/src/github.com/metal3-io/baremetal-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:298
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /go/src/github.com/metal3-io/baremetal-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
        /go/src/github.com/metal3-io/baremetal-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:214
runtime.goexit
        /usr/lib/golang/src/runtime/asm_amd64.s:1581


This is caused by a misnamed resource in the RBAC rules: bmceventsubscriptions/status vs bmceventsubscription/status

Comment 3 Ori Michaeli 2022-01-18 14:38:26 UTC
Verified using 4.10.0-0.nightly-2022-01-16-191814

Comment 6 errata-xmlrpc 2022-03-10 16:39:37 UTC
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: OpenShift Container Platform 4.10.3 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:0056


Note You need to log in before you can comment on or make changes to this bug.