Bug 2134796

Summary: clusterrolebindings for open-cluster-management-agent keep being recreated every 5 minutes
Product: Red Hat Advanced Cluster Management for Kubernetes Reporter: Felix Dewaleyne <fdewaley>
Component: Cluster LifecycleAssignee: Le Yang <leyan>
Status: CLOSED NOTABUG QA Contact: Hui Chen <huichen>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhacm-2.6CC: dhuynh, fdewaley, jayoung, leyan, qhao, slai, tuado
Target Milestone: ---Flags: slai: qe_test_coverage-
bot-tracker-sync: rhacm-2.6.z+
Target Release: rhacm-2.6.3   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-18 09:53:43 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:

Description Felix Dewaleyne 2022-10-14 10:49:12 UTC
Description of the problem:
clusterrolebindings for open-cluster-management-agent keep being recreated every 5 minutes 
Release version:
2.6.1
Operator snapshot version:

OCP version:
4.10.24

Browser Info:

Steps to reproduce:
1. attach a cluster successfully to the 2.6.1 instance
2. confirm it completely imported
3. check klusterlet logs

Actual results:
the logs are full of 
~~~
2022-10-03T08:17:58.183873661Z I1003 08:17:58.183777       1 event.go:285] Event(v1.ObjectReference{Kind:"Namespace", Namespace:"open-cluster-management-agent", Name:"open-cluster-management-agent", UID:"", APIVersion:"v1", ResourceVers
ion:"", FieldPath:""}): type: 'Normal' reason: 'ClusterRoleBindingCreated' Created ClusterRoleBinding.rbac.authorization.k8s.io/open-cluster-management:klusterlet-work:agent because it was missing
2022-10-03T08:17:59.665155494Z I1003 08:17:59.665044       1 event.go:285] Event(v1.ObjectReference{Kind:"Namespace", Namespace:"open-cluster-management-agent", Name:"open-cluster-management-agent", UID:"", APIVersion:"v1", ResourceVers
ion:"", FieldPath:""}): type: 'Normal' reason: 'RoleBindingCreated' Created RoleBinding.rbac.authorization.k8s.io/open-cluster-management:management:klusterlet-registration:agent -n kube-system because it was missing
~~~

Expected results:
information on if the clusterrolebinding has been created succesfully - object versions are stored in the etcd. That means a new record is created per object every 5 minutes unnecessarily

Additional info:
see private note added later

Comment 4 bot-tracker-sync 2022-10-19 07:23:56 UTC
G2Bsync 1283546786 comment 
 haoqing0110 Wed, 19 Oct 2022 07:20:35 UTC 
 G2Bsync

Fix in https://github.com/stolostron/registration-operator/pull/29, plz verify in ACM 2.6.3.

Comment 5 bot-tracker-sync 2022-11-22 16:40:46 UTC
G2Bsync 1323822810 comment 
 oafischer Tue, 22 Nov 2022 15:06:41 UTC 
 G2Bsync

Can someone provide a short summary of this fix? Thanks!

Comment 13 Felix Dewaleyne 2023-01-18 09:53:43 UTC
the issue was resolved when the upgrade to 2.6.3 was finished properly.