Bug 1278908 - describe limits missing "default" word
describe limits missing "default" word
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.1.0
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Derek Carr
Wei Sun
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-06 12:40 EST by Erik M Jacobs
Modified: 2016-09-07 17:29 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-07 17:29:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Erik M Jacobs 2015-11-06 12:40:37 EST
[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 14:40:56 EST
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 10:56:10 EST
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 17:07:00 EST
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 17:12:37 EST
See cherry-pick for Origin:
https://github.com/openshift/origin/pull/5905
Comment 6 Wei Sun 2015-11-15 21:58:22 EST
I'll check the bug after the fix is merged.
Comment 7 Johnny Liu 2015-11-17 21:38:12 EST
The PR is still not merged yet, so move its status to "MODIFIED"
Comment 8 Liang Xia 2016-02-22 02:33:29 EST
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-22 20:45:56 EST
Move to verified per comment #8

Note You need to log in before you can comment on or make changes to this bug.