Bug 1904030

Summary: [release-4.5] The quota controllers should resync on new resources and make progress
Product: OpenShift Container Platform Reporter: Lukasz Szaszkiewicz <lszaszki>
Component: kube-controller-managerAssignee: Lukasz Szaszkiewicz <lszaszki>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: high Docs Contact:
Priority: high    
Version: 4.5CC: aos-bugs, mfojtik, yinzhou
Target Milestone: ---   
Target Release: 4.5.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 1904028
: 1904032 (view as bug list) Environment:
Last Closed: 2021-01-20 05:49:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1904028    
Bug Blocks: 1904032, 1910096    

Description Lukasz Szaszkiewicz 2020-12-03 11:55:10 UTC
+++ This bug was initially created as a clone of Bug #1904028 +++

+++ This bug was initially created as a clone of Bug #1904026 +++

The quota controllers act on resources retrieved from the discovery endpoint which might contain only a fraction of all resources due to a network error.

Both controllers should periodically resync when new resources are observed from the discovery.

Additionally, the CRQ should always ensure the current set of monitors are running.
The CRQ should not block when new resources are observed (deadlock).

Comment 1 zhou ying 2020-12-15 08:21:21 UTC
Confirmed with payload: 4.5.0-0.ci.test-2020-12-15-072346-ci-ln-x6p47n2 , the issue has fixed:


[root@dhcp-140-138 roottest]# oc get clusterversion 
NAME      VERSION                                           AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.5.0-0.ci.test-2020-12-15-072346-ci-ln-x6p47n2   True        False         5m16s   Cluster version is 4.5.0-0.ci.test-2020-12-15-072346-ci-ln-x6p47n2

Follow steps: 
1) Scale down the CVO to replicas==0;
2) Chang the openshiftapiservers to Unmanaged status;
3) Scale down the openshift apiserver to 0, to turn off the openshift-apiserver;
4) restart all KCMs;
5) Turn on the openshift-apiserver;
6)Create test project and imagestream resource and quota about imagestream:
7) Delete all the imagestream, check the quota :


[root@dhcp-140-138 roottest]# oc get is
NAME                       IMAGE REPOSITORY                                                                  TAGS   UPDATED
rails-postgresql-example   image-registry.openshift-image-registry.svc:5000/zhouy/rails-postgresql-example          
[root@dhcp-140-138 roottest]#  oc create quota test1 --hard=openshift.io/imagestreams=10
resourcequota/test1 created
[root@dhcp-140-138 roottest]# oc describe quota test1
Name:                      test1
Namespace:                 zhouy
Resource                   Used  Hard
--------                   ----  ----
openshift.io/imagestreams  1     10
[root@dhcp-140-138 roottest]# oc delete all --all
......
[root@dhcp-140-138 roottest]# oc get is
No resources found in zhouy namespace.
[root@dhcp-140-138 roottest]# oc describe quota test1
Name:                      test1
Namespace:                 zhouy
Resource                   Used  Hard
--------                   ----  ----
openshift.io/imagestreams  0     10

Comment 5 errata-xmlrpc 2021-01-20 05:49:27 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 (OpenShift Container Platform 4.5.27 bug fix 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/RHBA-2021:0033