Bug 1312385 - 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 DUPLICATE of bug 1312282
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:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-26 15:28 UTC by Qixuan Wang
Modified: 2016-02-26 15:58 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-26 15:58:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Qixuan Wang 2016-02-26 15:28:38 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
Sorry,a wrong summit, duplicate https://bugzilla.redhat.com/show_bug.cgi?id=1312282,so close it.

*** This bug has been marked as a duplicate of bug 1312282 ***


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