Bug 1427084
| Summary: | [trello btzCBamB] Used cluster quota by current project is not shown correctly | ||
|---|---|---|---|
| Product: | OKD | Reporter: | Xingxing Xia <xxia> |
| Component: | Management Console | Assignee: | Samuel Padgett <spadgett> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Yadan Pei <yapei> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.x | CC: | aos-bugs, jforrest, jokerman, mmccomas, spadgett |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-05-30 12:50:28 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: | |||
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. |
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: