Bug 1891518 - openshift-object-counts quota is not dynamically updating as the resource is deleted.
Summary: openshift-object-counts quota is not dynamically updating as the resource is ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: kube-controller-manager
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.6.z
Assignee: Lukasz Szaszkiewicz
QA Contact: zhou ying
URL:
Whiteboard:
Depends On: 1879430
Blocks: 1891527
TreeView+ depends on / blocked
 
Reported: 2020-10-26 14:03 UTC by Lukasz Szaszkiewicz
Modified: 2020-12-14 13:50 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1879430
: 1891527 (view as bug list)
Environment:
Last Closed: 2020-12-14 13:50:25 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-policy-controller pull 45 0 None closed Bug 1891518: openshift-object-counts quota is not dynamically updating as the resource is deleted 2021-02-04 09:23:51 UTC
Red Hat Product Errata RHSA-2020:5259 0 None None None 2020-12-14 13:50:39 UTC

Comment 1 zhou ying 2020-11-12 03:32:02 UTC
Done the pre--merge-verify with : 4.6.0-0.ci.test-2020-11-12-023057-ci-ln-mq83wx2:

Steps:
1) create quota:
`oc create quota test1 --hard=openshift.io/imagestreams=10`
2) check the quota:
[zhouying@dhcp-140-138 ~]$ oc describe quota test1
Name:                      test1
Namespace:                 zhouyt
Resource                   Used  Hard
--------                   ----  ----
openshift.io/imagestreams  0     10

3)create the first app:
`oc new-app httpd-example`
4) check the quota:
[zhouying@dhcp-140-138 ~]$ oc get is 
NAME            IMAGE REPOSITORY                                                        TAGS   UPDATED
httpd-example   image-registry.openshift-image-registry.svc:5000/zhouyt/httpd-example          
[zhouying@dhcp-140-138 ~]$ oc describe quota test1
Name:                      test1
Namespace:                 zhouyt
Resource                   Used  Hard
--------                   ----  ----
openshift.io/imagestreams  1     10

5) create the second app:
`oc new-app rails-postgresql-example`
6) check the quota:
[zhouying@dhcp-140-138 ~]$ oc get is 
NAME                       IMAGE REPOSITORY                                                                   TAGS     UPDATED
httpd-example              image-registry.openshift-image-registry.svc:5000/zhouyt/httpd-example              latest   3 minutes ago
rails-postgresql-example   image-registry.openshift-image-registry.svc:5000/zhouyt/rails-postgresql-example   latest   19 seconds ago
[zhouying@dhcp-140-138 ~]$ oc describe quota test1
Name:                      test1
Namespace:                 zhouyt
Resource                   Used  Hard
--------                   ----  ----
openshift.io/imagestreams  2     10

7) delete app:
`oc delete all -l app=httpd-example`
8) check the quota:
[zhouying@dhcp-140-138 ~]$ oc get is 
NAME                       IMAGE REPOSITORY                                                                   TAGS     UPDATED
rails-postgresql-example   image-registry.openshift-image-registry.svc:5000/zhouyt/rails-postgresql-example   latest   About a minute ago
[zhouying@dhcp-140-138 ~]$ oc describe quota test1
Name:                      test1
Namespace:                 zhouyt
Resource                   Used  Hard
--------                   ----  ----
openshift.io/imagestreams  1     10

9)delete all app:
`oc delete all --all`
10) check the quota:
[zhouying@dhcp-140-138 ~]$ oc get is 
No resources found in zhouyt namespace.
[zhouying@dhcp-140-138 ~]$ oc describe quota test1
Name:                      test1
Namespace:                 zhouyt
Resource                   Used  Hard
--------                   ----  ----
openshift.io/imagestreams  0     10


Based on the above we could clarify this issue has fixed.

Comment 2 Lukasz Szaszkiewicz 2020-11-16 09:46:43 UTC
The PR is waiting for the cherry-pick-approved label.

Comment 4 zhou ying 2020-11-27 09:29:06 UTC
Confirmed with latest payload: 4.6.0-0.nightly-2020-11-26-234822 , the issue has fixed:

[root@dhcp-140-138 roottest]# oc get clusterversion 
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2020-11-26-234822   True        False         44m     Cluster version is 4.6.0-0.nightly-2020-11-26-234822


steps:
1) `oc create quota test1 --hard=openshift.io/imagestreams=10`
2) [root@dhcp-140-138 roottest]# oc describe quota test1
Name:                      test1
Namespace:                 zhouy
Resource                   Used  Hard
--------                   ----  ----
openshift.io/imagestreams  0     10

3) `oc new-app httpd-example`
4) [root@dhcp-140-138 roottest]# oc get is 
NAME            IMAGE REPOSITORY                                                       TAGS   UPDATED
httpd-example   image-registry.openshift-image-registry.svc:5000/zhouy/httpd-example          
[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 7 errata-xmlrpc 2020-12-14 13:50:25 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.6.8 security and 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/RHSA-2020:5259


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