Bug 1312282 - Request/Limit of individual container shouldn't exceed to the pod
Summary: Request/Limit of individual container shouldn't exceed to the pod
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Derek Carr
QA Contact: DeShuai Ma
URL:
Whiteboard:
: 1312385 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-26 10:31 UTC by Qixuan Wang
Modified: 2016-04-07 14:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-07 14:35:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Qixuan Wang 2016-02-26 10:31:21 UTC
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:
Always

Steps to Reproduce:
1.Set limitrange resource
# cat limitrange.yaml 
apiVersion: v1
kind: LimitRange
metadata:
  name: limitrange
spec:
  limits:
  - max:
      cpu: 500m
      memory: 750Mi
    min:
      cpu: 10m
      memory: 5Mi
    maxLimitRequestRatio:
      cpu: 1
      memory: 2
    type: Pod
  - default:
      cpu: 900m
      memory: 800Mi
    defaultRequest:
      cpu: 600m
      memory: 760Mi
    maxLimitRequestRatio:
      cpu: 10
      memory: 8
    max:
      cpu: 1
      memory: 4Gi
    min:
      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 15:58:48 UTC
*** Bug 1312385 has been marked as a duplicate of this bug. ***

Comment 2 Derek Carr 2016-02-26 16:22:38 UTC
Future support may in-fact allow a pod to be over-committed by its containers.

Comment 3 Derek Carr 2016-04-07 14:35:37 UTC
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.