Description of problem: Used cluster quota by current project is not shown correctly Version-Release number of selected component (if applicable): openshift v1.5.0-alpha.3+bc6686d-117 kubernetes v1.5.2+43a9be4 etcd 3.1.0 How reproducible: Always Steps to Reproduce: 1. Creates 3 projects: prozyp,prozyp1,prozyp2 2. Cluster admin add label to prozyp1,prozyp2, and create cluster resource quota: # oc label namespace/prozyp1 test=one namespace "prozyp1" labeled # oc label namespace/prozyp2 test=one namespace "prozyp2" labeled # oc create clusterresourcequota clusterquota --project-label-selector=test=one --hard=pods=10,memory=1Gi,cpu=800m,secrets=18 clusterresourcequota "clusterquota" created 3. In prozyp1 create pod with cpu/memory resource set. # oc run testpod1 --image=aosqe/hello-openshift --generator=run-pod/v1 --limits='cpu=300m,memory=300Mi' -n prozyp1 4. Check cluster quota on Resources --> Quota page of prozyp1 Actual results: 4. For CPU/Memory/Pods/Secrets table, it all shows "—" under "Used (This Project)" column. For CPU/Memory charts, click "Used - This Project", it SHOULD show xx% CPU used by current project, but it shows nothing. Click "Used - Other Projects", it SHOULD show nothing, but it shows xx% CPU used by other projects. (Memory is similar). Though CLI shows correctly: # oc get clusterquota clusterquota -o yaml --config /openshift.local.config/master/admin.kubeconfig ... status: namespaces: - namespace: prozyp1 status: hard: cpu: 500m memory: 1Gi pods: "4" secrets: "18" used: cpu: 300m memory: 300Mi pods: "1" secrets: "9" - namespace: prozyp2 status: hard: cpu: 500m memory: 1Gi pods: "4" secrets: "18" used: cpu: "0" memory: "0" pods: "0" secrets: "9" total: hard: cpu: 500m memory: 1Gi pods: "4" secrets: "18" used: cpu: 300m memory: 300Mi pods: "1" secrets: "18" Expected results: 4. Table and Chart should show correctly as CLI Additional info:
This is only a problem in 3.6. https://github.com/openshift/origin-web-console/pull/1307
Commit pushed to master at https://github.com/openshift/origin-web-console https://github.com/openshift/origin-web-console/commit/71d4685a28a332d0210291783a34138b52590cfb Bug 1427084 - Fix problem showing project usage for cluster quota Since we switched from a `clusterQuotas` map to a `clusterQuotas` array for sorting, we incorrectly keyed the `namespaceUsageByClusterQuota` map by array index instead of namespace. This prevented the project usage for a cluster quota from displaying. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1427084
Verified in: openshift v1.5.0-alpha.3+f45c2bd-134 Fix. Now cluster quota used by current/other/all project(s) are displayed correctly in table, chart.