Bug 1278683
Summary: | Column of Resource limits Request/Limit/Ratio are missing when describe a project which has limit set | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Liang Xia <lxia> |
Component: | oc | Assignee: | Maciej Szulik <maszulik> |
Status: | CLOSED ERRATA | QA Contact: | Xingxing Xia <xxia> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 3.1.0 | CC: | aos-bugs, jokerman, lxia, mmccomas |
Target Milestone: | --- | Flags: | lxia:
needinfo-
|
Target Release: | 3.7.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause:
Missing columns in oc describe project for defined limits.
Consequence:
Limits output was not complete when describing a project.
Fix:
Adds the "Limit" and "Limit/Request" columns seen when describing a LimitRange to the "describe" output of projects.
Result:
The describe output of both project and limits is consistent.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2019-04-09 23:36:59 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
Liang Xia
2015-11-06 07:19:35 UTC
Still can be reproduced on version, openshift v3.1.1.904 kubernetes v1.2.0-alpha.7-703-gbc4550d etcd 2.2.5 $ oc describe project default --config=admin.kubeconfig Name: default Created: 5 hours ago Labels: <none> Annotations: openshift.io/sa.initialized-roles=true openshift.io/sa.scc.mcs=s0:c1,c0 openshift.io/sa.scc.supplemental-groups=1000000000/10000 openshift.io/sa.scc.uid-range=1000000000/10000 Display Name: <none> Description: <none> Status: Active Node Selector: <none> Quota: <none> Resource limits: Name: limits Type Resource Min Max Default ---- -------- --- --- --- Pod cpu 10m 500m - Pod memory 5Mi 750Mi - Container cpu 10m 500m 100m Container memory 5Mi 750Mi 100Mi $ oc describe limits limits Name: limits Namespace: default Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio ---- -------- --- --- --------------- ------------- ----------------------- Pod cpu 10m 500m - - - Pod memory 5Mi 750Mi - - - Container memory 5Mi 750Mi 100Mi 100Mi - Container cpu 10m 500m 100m 100m - Tested on below version, still can reproduce. Maybe the current build does not contain the fix yet. Will try again once we got a newer build. openshift v3.7.0-0.181.0 kubernetes v1.7.6+a08f5eeb62 # oc describe project default Name: default Created: 5 hours ago Labels: <none> Annotations: openshift.io/node-selector= openshift.io/sa.initialized-roles=true openshift.io/sa.scc.mcs=s0:c1,c0 openshift.io/sa.scc.supplemental-groups=1000000000/10000 openshift.io/sa.scc.uid-range=1000000000/10000 Display Name: <none> Description: <none> Status: Active Node Selector: <none> Quota: <none> Resource limits: Name: resource-limits Type Resource Min Max Default ---- -------- --- --- --- Pod memory 6Mi 1Gi - Pod cpu 200m 2 - Container cpu 100m 2 300m Container memory 4Mi 1Gi 200Mi # oc describe limits Name: resource-limits Namespace: default Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio ---- -------- --- --- --------------- ------------- ----------------------- Pod cpu 200m 2 - - - Pod memory 6Mi 1Gi - - - Container memory 4Mi 1Gi 100Mi 200Mi - Container cpu 100m 2 200m 300m 10 Checked on below version, you can see that limits in describe project and describe limit are different, assign back to get this fixed. # openshift version openshift v3.7.0-0.184.0 kubernetes v1.7.6+a08f5eeb62 etcd 3.2.8 # oc describe project default Name: default Created: 2 hours ago Labels: <none> Annotations: openshift.io/node-selector= openshift.io/sa.initialized-roles=true openshift.io/sa.scc.mcs=s0:c1,c0 openshift.io/sa.scc.supplemental-groups=1000000000/10000 openshift.io/sa.scc.uid-range=1000000000/10000 Display Name: <none> Description: <none> Status: Active Node Selector: <none> Quota: <none> Resource limits: Name: resource-limits Type Resource Min Max Default Limit Limit/Request ---- -------- --- --- --- ----- ------------- Pod cpu 200m 2 - - - Pod memory 6Mi 1Gi - - - Container memory 4Mi 1Gi 200Mi 200Mi - Container cpu 100m 2 300m 300m 10 # oc describe limits Name: resource-limits Namespace: default Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio ---- -------- --- --- --------------- ------------- ----------------------- Pod cpu 200m 2 - - - Pod memory 6Mi 1Gi - - - Container cpu 100m 2 200m 300m 10 Container memory 4Mi 1Gi 100Mi 200Mi - > you can see that limits in describe project and describe limit are different
How are they different? Both display the same info about a limit range object, with some column names worded slightly different (Limit/Request vs. Limit/Request Ration)
You can see that they have different values in column of "Default" in project and "Default Request" in limit for Container cpu/memory. This is working as expected since 3.7, moving to qa. Checked on below version, you can see that limits in describe project and describe limit are different, assign back to get this fixed. # oc version ; oc describe project myp ; oc describe limits resource-limits ; cat limit.yaml oc v3.7.98 kubernetes v1.7.6+a08f5eeb62 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://10.0.77.94:8443 openshift v3.7.98 kubernetes v1.7.6+a08f5eeb62 Name: myp Created: 3 hours ago Labels: <none> Annotations: openshift.io/description= openshift.io/display-name= openshift.io/requester=system:admin openshift.io/sa.scc.mcs=s0:c11,c5 openshift.io/sa.scc.supplemental-groups=1000120000/10000 openshift.io/sa.scc.uid-range=1000120000/10000 Display Name: <none> Description: <none> Status: Active Node Selector: <none> Quota: <none> Resource limits: Name: resource-limits Type Resource Min Max Default Limit Limit/Request ---- -------- --- --- --- ----- ------------- Pod cpu 200m 2 - - - Pod memory 6Mi 1Gi - - - Container cpu 100m 2 300m 300m 10 Container memory 4Mi 1Gi 200Mi 200Mi - Name: resource-limits Namespace: myp Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio ---- -------- --- --- --------------- ------------- ----------------------- Pod memory 6Mi 1Gi - - - Pod cpu 200m 2 - - - Container cpu 100m 2 200m 300m 10 Container memory 4Mi 1Gi 100Mi 200Mi - apiVersion: "v1" kind: "LimitRange" metadata: name: "resource-limits" spec: limits: - type: "Pod" max: cpu: "2" memory: "1Gi" min: cpu: "200m" memory: "6Mi" - type: "Container" max: cpu: "2" memory: "1Gi" min: cpu: "100m" memory: "4Mi" default: cpu: "300m" memory: "200Mi" defaultRequest: cpu: "200m" memory: "100Mi" maxLimitRequestRatio: cpu: "10" Proposed a PR, https://github.com/openshift/origin/pull/22165 Tested with above code change, and build the oc client locally, verified the issue described in #comment 10 is fixed. # alias oc=~/github.com/liangxia/origin/_output/local/bin/linux/amd64/oc # oc version ; oc describe project myp ; oc describe limits resource-limits ; cat limit.yaml Client Version: version.Info{Major:"", Minor:"", GitVersion:"v1.1+e30601b-20387-dirty", GitCommit:"e30601b178", GitTreeState:"", BuildDate:"2019-02-27T08:02:49Z", GoVersion:"", Compiler:"", Platform:""} Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.6+a08f5eeb62", GitCommit:"c84beff", GitTreeState:"clean", BuildDate:"2019-02-23T19:32:12Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"} Name: myp Created: 3 hours ago Labels: <none> Annotations: openshift.io/description= openshift.io/display-name= openshift.io/requester=system:admin openshift.io/sa.scc.mcs=s0:c11,c5 openshift.io/sa.scc.supplemental-groups=1000120000/10000 openshift.io/sa.scc.uid-range=1000120000/10000 Display Name: <none> Description: <none> Status: Active Node Selector: <none> Quota: <none> Resource limits: Name: resource-limits Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio ---- -------- --- --- --------------- ------------- ----------------------- Pod cpu 200m 2 - - - Pod memory 6Mi 1Gi - - - Container memory 4Mi 1Gi 100Mi 200Mi - Container cpu 100m 2 200m 300m 10 Name: resource-limits Namespace: myp Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio ---- -------- --- --- --------------- ------------- ----------------------- Pod cpu 200m 2 - - - Pod memory 6Mi 1Gi - - - Container cpu 100m 2 200m 300m 10 Container memory 4Mi 1Gi 100Mi 200Mi - apiVersion: "v1" kind: "LimitRange" metadata: name: "resource-limits" spec: limits: - type: "Pod" max: cpu: "2" memory: "1Gi" min: cpu: "200m" memory: "6Mi" - type: "Container" max: cpu: "2" memory: "1Gi" min: cpu: "100m" memory: "4Mi" default: cpu: "300m" memory: "200Mi" defaultRequest: cpu: "200m" memory: "100Mi" maxLimitRequestRatio: cpu: "10" I don't think fix from https://github.com/openshift/origin/pull/22165 is needed. Can you please check newer versions? I've tested that with a fresh build of 3.7 all the way up to 4.0 and it worked every single time. Explains in the PR. Fix for 3.7, https://github.com/openshift/ose/pull/1496 merged. # oc version ; oc describe project default ; oc describe limits resource-limits -n default oc v3.7.108 kubernetes v1.7.6+a08f5eeb62 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://10.0.77.0:8443 openshift v3.7.108 kubernetes v1.7.6+a08f5eeb62 Name: default Created: 4 hours ago Labels: <none> Annotations: openshift.io/logging.data.prefix=.operations openshift.io/node-selector= openshift.io/sa.initialized-roles=true openshift.io/sa.scc.mcs=s0:c1,c0 openshift.io/sa.scc.supplemental-groups=1000000000/10000 openshift.io/sa.scc.uid-range=1000000000/10000 Display Name: <none> Description: <none> Status: Active Node Selector: <none> Quota: <none> Resource limits: Name: resource-limits Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio ---- -------- --- --- --------------- ------------- ----------------------- Pod memory 6Mi 1Gi - - - Pod cpu 200m 2 - - - Container cpu 100m 2 200m 300m 10 Container memory 4Mi 1Gi 100Mi 200Mi - Name: resource-limits Namespace: default Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio ---- -------- --- --- --------------- ------------- ----------------------- Pod cpu 200m 2 - - - Pod memory 6Mi 1Gi - - - Container cpu 100m 2 200m 300m 10 Container memory 4Mi 1Gi 100Mi 200Mi - 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, 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-2019:0617 |