Bug 1312282 - Request/Limit of individual container shouldn't exceed to the pod
Request/Limit of individual container shouldn't exceed to the pod
Product: OpenShift Origin
Classification: Red Hat
Component: Pod (Show other bugs)
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Derek Carr
DeShuai Ma
: 1312385 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2016-02-26 05:31 EST by Qixuan Wang
Modified: 2016-04-07 10:35 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-04-07 10:35:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Qixuan Wang 2016-02-26 05:31:21 EST
Description of problem:
Set request/limit of limitType=Container larger than limitType=Pod, no warning message shows and the limitrange resource can be created.

Version-Release number of selected component (if applicable):
oc v1.1.3-274-g209837a
kubernetes v1.2.0-alpha.7-703-gbc4550d

How reproducible:

Steps to Reproduce:
1.Set limitrange resource
# cat limitrange.yaml 
apiVersion: v1
kind: LimitRange
  name: limitrange
  - max:
      cpu: 500m
      memory: 750Mi
      cpu: 10m
      memory: 5Mi
      cpu: 1
      memory: 2
    type: Pod
  - default:
      cpu: 900m
      memory: 800Mi
      cpu: 600m
      memory: 760Mi
      cpu: 10
      memory: 8
      cpu: 1
      memory: 4Gi
      cpu: 10m
      memory: 5Mi
    type: Container

# oc create -f limitrange.yaml -n qwang1 --config=./admin.kubeconfig

2.Check limits
# oc describe limits limitrange

Actual results:
2. # oc describe limits limitrange 
Name:		limitrange
Namespace:	qwang1
Type		Resource	Min	Max	Default Request	Default Limit	Max Limit/Request Ratio
----		--------	---	---	---------------	-------------	-----------------------
Pod		cpu		10m	500m	-		-		1
Pod		memory		5Mi	750Mi	-		-		2
Container	memory		5Mi	4Gi	760Mi		800Mi		8
Container	cpu		10m	1	600m		900m		10

Expected results:
It's better to check limitrange validity. When request/limit exceed to pod restriction, it should give warning messages.

Additional info:
Comment 1 Qixuan Wang 2016-02-26 10:58:48 EST
*** Bug 1312385 has been marked as a duplicate of this bug. ***
Comment 2 Derek Carr 2016-02-26 11:22:38 EST
Future support may in-fact allow a pod to be over-committed by its containers.
Comment 3 Derek Carr 2016-04-07 10:35:37 EDT
I am closing this as not a bug.

We plan to allow a pod to be overcommitted by its containers in the future when we add pod-level cgroups.

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