Bug 1707517 - CNO updates role bindings too frequently
Summary: CNO updates role bindings too frequently
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.2.0
Assignee: Casey Callendrello
QA Contact: Weibin Liang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-07 17:02 UTC by Mo
Modified: 2019-10-16 06:28 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-16 06:28:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1706637 0 unspecified CLOSED RoleBindingRestriction being listed 4 times a second during e2e runs 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:28:43 UTC

Description Mo 2019-05-07 17:02:08 UTC
Based on audit logs of a cluster that has been running for a day:

$ cat * | grep '"resource":"rolebindings"' | grep '"verb":"update"' | jq -r '.user.username+"\t->\t "+.objectRef.namespace+":"+.objectRef.name' | sort | uniq -c
   3577 system:serviceaccount:openshift-machine-config-operator:default	->	 default:machine-config-daemon-events
   3577 system:serviceaccount:openshift-machine-config-operator:default	->	 openshift-machine-config-operator:machine-config-daemon-events
    320 system:serviceaccount:openshift-monitoring:cluster-monitoring-operator	->	 default:prometheus-k8s
    320 system:serviceaccount:openshift-monitoring:cluster-monitoring-operator	->	 kube-system:prometheus-k8s
    321 system:serviceaccount:openshift-monitoring:cluster-monitoring-operator	->	 kube-system:resource-metrics-auth-reader
    320 system:serviceaccount:openshift-monitoring:cluster-monitoring-operator	->	 openshift-apiserver:prometheus-k8s
    320 system:serviceaccount:openshift-monitoring:cluster-monitoring-operator	->	 openshift-cluster-version:prometheus-k8s
    320 system:serviceaccount:openshift-monitoring:cluster-monitoring-operator	->	 openshift-etcd:prometheus-k8s
    321 system:serviceaccount:openshift-monitoring:cluster-monitoring-operator	->	 openshift-kube-controller-manager:prometheus-k8s
    321 system:serviceaccount:openshift-monitoring:cluster-monitoring-operator	->	 openshift-kube-scheduler:prometheus-k8s
    320 system:serviceaccount:openshift-monitoring:cluster-monitoring-operator	->	 openshift-monitoring:prometheus-k8s
    320 system:serviceaccount:openshift-monitoring:cluster-monitoring-operator	->	 openshift-monitoring:prometheus-k8s-config
    210 system:serviceaccount:openshift-network-operator:default	->	 openshift-infra:openshift-sdn-controller-account
    210 system:serviceaccount:openshift-network-operator:default	->	 openshift-sdn:openshift-sdn-controller-leaderelection
    210 system:serviceaccount:openshift-network-operator:default	->	 openshift-sdn:prometheus-k8s

CNO is continuously updating three role bindings.  It should only update when the role binding is different than the expected value.

Comment 1 Ben Bennett 2019-05-07 17:19:05 UTC
There's no way we can safely make this change before code freeze.  Pushing to 4.2.

Comment 2 Casey Callendrello 2019-05-08 11:23:33 UTC
It's possible that I fixed this a few hours before this bug was filed. But we can check in 4.2.

Comment 3 Casey Callendrello 2019-06-18 15:28:37 UTC
Fixed in https://github.com/openshift/cluster-network-operator/pull/170.

Comment 5 Weibin Liang 2019-06-25 18:39:19 UTC
@mkhan,

How did you collect those audit logs? I try to use you steps to verify this bugs in v4.2.

Comment 6 zhaozhanqi 2019-07-03 10:09:51 UTC
@mkhan

I check the logs in /var/log/kube-apiserver of master which worked more than 6 hours with version 4.2.0-0.nightly-2019-07-03-003353

no update for role binding:

[root@ip-10-0-172-244 kube-apiserver]#  cat audit.log | grep '"resource":"rolebindings"' | grep '"verb":"update"' | grep openshift-network-operator
[root@ip-10-0-172-244 kube-apiserver]# 

So this bug should be fixed. please correct me if the steps are not enough.  thanks.

Comment 7 errata-xmlrpc 2019-10-16 06:28:32 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, 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/RHBA-2019:2922


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