Bug 1314666

Summary: [infrastructure_public_52]When edit quota spec, the quota status should be calculated ASAP
Product: OKD Reporter: DeShuai Ma <dma>
Component: PodAssignee: Derek Carr <decarr>
Status: CLOSED CURRENTRELEASE QA Contact: Qixuan Wang <qixuan.wang>
Severity: low Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, decarr, mmccomas
Target Milestone: ---   
Target Release: 3.x   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-10 21:35:06 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 DeShuai Ma 2016-03-04 08:29:35 UTC
Description of problem:
When edit quota spec, the quota status can be calculated ASAP.
On upstream it can be updated ASAP.

Version-Release number of selected component (if applicable):
openshift v1.1.3-337-g5df15c9
kubernetes v1.2.0-alpha.7-703-gbc4550d
etcd 2.2.5

How reproducible:
Always

Steps to Reproduce:
1.Create one quota
[root@ip-172-18-14-46 origin]# cat quota.yaml 
apiVersion: v1
kind: ResourceQuota
metadata:
  name: myquota-1
spec:
  hard:
    cpu: "50m"
    memory: 16Gi
    persistentvolumeclaims: "20"
    pods: "20"
    replicationcontrollers: "30"
    resourcequotas: "1"
    secrets: "15"
    services: "10"
$ oc create -f quota.yaml -n dma

2.Check quota status
[root@ip-172-18-14-46 origin]# oc describe quota/myquota-1 -n dma
Name:			myquota-1
Namespace:		dma
Resource		Used	Hard
--------		----	----
cpu			0	50m
memory			0	16Gi
persistentvolumeclaims	0	20
pods			0	20
replicationcontrollers	0	30
resourcequotas		1	1
secrets			9	15
services		0	10

3.Edit the quota spec with some change
$ oc edit quota/myquota-1 -n dma

4.Check the quota status again.
$ oc describe quota/myquota-1 -n dma

Actual results:
4.Wait a long time before the quota status is changed.

Expected results:
4.The quota status should be changed ASAP

Additional info:

Comment 1 Derek Carr 2016-03-04 21:35:03 UTC
Marking the priority low, but will investigate root cause.

Comment 2 Derek Carr 2017-06-04 02:18:31 UTC
I am no longer able to reproduce this problem on the following:

oc v3.6.0-alpha.1+90592c5-1003-dirty
kubernetes v1.6.1+5115d708d7
features: Basic-Auth

Server https://192.168.0.24:8443
openshift v3.6.0-alpha.1+90592c5-1003-dirty
kubernetes v1.6.1+5115d708d7

Comment 3 DeShuai Ma 2017-06-05 09:49:32 UTC
Verify on openshift v3.6.94.  can't reproduce.

[root@qe-dma36-master-1 ~]# oadm new-project dma
Created project dma
[root@qe-dma36-master-1 ~]# oc create -f quota.yaml -n dma
resourcequota "myquota-1" created
[root@qe-dma36-master-1 ~]# oc describe quota/myquota-1 -n dma
Name:			myquota-1
Namespace:		dma
Resource		Used	Hard
--------		----	----
cpu			0	50m
memory			0	16Gi
persistentvolumeclaims	0	20
pods			0	20
replicationcontrollers	0	30
resourcequotas		1	1
secrets			9	15
services		0	10
[root@qe-dma36-master-1 ~]# oc edit quota/myquota-1 -n dma
resourcequota "myquota-1" edited
[root@qe-dma36-master-1 ~]# oc describe quota/myquota-1 -n dma
Name:			myquota-1
Namespace:		dma
Resource		Used	Hard
--------		----	----
cpu			0	50m
memory			0	10Gi
persistentvolumeclaims	0	5
pods			0	15
replicationcontrollers	0	15
resourcequotas		1	4
secrets			9	20
services		0	30