Bug 1278908

Summary: describe limits missing "default" word
Product: OpenShift Container Platform Reporter: Erik M Jacobs <ejacobs>
Component: ocAssignee: Derek Carr <decarr>
Status: CLOSED CURRENTRELEASE QA Contact: Wei Sun <wsun>
Severity: low Docs Contact:
Priority: low    
Version: 3.1.0CC: aos-bugs, ffranz, jialiu, jokerman, lxia, mmccomas, tdawson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-07 21:29:24 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 Erik M Jacobs 2015-11-06 17:40:37 UTC
[root@ose3-master training]# oc describe limits foo-limits -n foo
Name:           foo-limits
Namespace:      foo
Type            Resource        Min     Max     Request Limit   Limit/Request
----            --------        ---     ---     ------- -----   -------------
Pod             cpu             10m     500m    -       -       -
Pod             memory          5Mi     750Mi   -       -       -
Container       cpu             10m     500m    100m    100m    -
Container       memory          5Mi     750Mi   100Mi   100Mi   -

It isn't really clear what these columns mean. Here's the JSON that created this:

{
    "kind": "LimitRange",
    "apiVersion": "v1",
    "metadata": {
        "name": "limits",
        "creationTimestamp": null
    },
    "spec": {
        "limits": [
            {
                "type": "Pod",
                "max": {
                    "cpu": "500m",
                    "memory": "750Mi"
                },
                "min": {
                    "cpu": "10m",
                    "memory": "5Mi"
                }
            },
            {
                "type": "Container",
                "max": {
                    "cpu": "500m",
                    "memory": "750Mi"
                },
                "min": {
                    "cpu": "10m",
                    "memory": "5Mi"
                },
                "default": {
                    "cpu": "100m",
                    "memory": "100Mi"
                }
            }
        ]
    }
}

The CLI output doesn't mention "default", but seems to put these values under "request" *AND* ??? "limit"... but what is "limit / request"?

It's very confusing. The 3.0.2 output did have a "default" column.

Comment 2 Derek Carr 2015-11-06 19:40:56 UTC
Maybe something like the following:

[root@ose3-master training]# oc describe limits foo-limits -n foo
Name:           foo-limits
Namespace:      foo

The amount of compute resources per pod must conform to the following:

Resource        Min     Max     Burst (Limit/Request)
--------        ---     ---     -----------------------
cpu             10m     500m    10
memory          5Mi     750Mi   10

The amount of compute resources per container must conform to the following:

Resource        Min     Max     Burst (Limit/Request)
--------        ---     ---     -----------------------
cpu             10m     500m    10
memory          5Mi     750Mi   10

If a container does not specify a compute resource, it will default as follows:

Resource        Request Limit
--------        ------- -----
cpu             100m    100m 
memory          100Mi   100Mi

Comment 3 Derek Carr 2015-11-09 15:56:10 UTC
I am lowering priority as its not a release-blocker, but agree we can look to improve the output as an update to upstream Kube.

Comment 4 Derek Carr 2015-11-13 22:07:00 UTC
Fix in upstream Kube here:
https://github.com/kubernetes/kubernetes/pull/17255

It aligns display with what we show in the web console right now.

Comment 5 Derek Carr 2015-11-13 22:12:37 UTC
See cherry-pick for Origin:
https://github.com/openshift/origin/pull/5905

Comment 6 Wei Sun 2015-11-16 02:58:22 UTC
I'll check the bug after the fix is merged.

Comment 7 Johnny Liu 2015-11-18 02:38:12 UTC
The PR is still not merged yet, so move its status to "MODIFIED"

Comment 8 Liang Xia 2016-02-22 07:33:29 UTC
The fix are there now.

Checked on version,
openshift v3.1.1.904
kubernetes v1.2.0-alpha.7-703-gbc4550d
etcd 2.2.5

$ oc describe limits limits -n default
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	cpu		10m	500m	100m		100m		-
Container	memory		5Mi	750Mi	100Mi		100Mi		-


Once the bug moved to ON_QA, we can move it to verified.

Comment 9 Liang Xia 2016-02-23 01:45:56 UTC
Move to verified per comment #8