Bug 1359699 - [infrastructure_public_278]Quota should properly calculate Init containers request and limits value.
Summary: [infrastructure_public_278]Quota should properly calculate Init containers re...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Andy Goldstein
QA Contact: DeShuai Ma
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-25 10:20 UTC by DeShuai Ma
Modified: 2016-09-19 14:30 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-19 14:30:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1933 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 13:24:36 UTC

Description DeShuai Ma 2016-07-25 10:20:30 UTC
Description of problem:
When init container contain limits and request value, the quota should properly calculate init containers request and limits value for pod

Version-Release number of selected component (if applicable):
openshift v3.3.0.9
kubernetes v1.3.0+57fb9ac
etcd 2.3.0+git

How reproducible:
Always

Steps to Reproduce:
1.Create quota for user project
$ oc create -f https://raw.githubusercontent.com/mdshuai/testfile-openshift/master/initContainer/quota.yaml -n $project

2.Create a pod with init container which has been set request and limits value
$ oc create -f https://raw.githubusercontent.com/mdshuai/testfile-openshift/master/initContainer/init-containers-quota-1.yaml

3.When pod is running, check pod info
$ oc describe quota compute-resources

Actual results:
[root@dhcp-128-7 dma]# oc describe quota compute-resources
Name:		compute-resources
Namespace:	dma
Resource	Used	Hard
--------	----	----
limits.cpu	300m	2
limits.memory	240Mi	2Gi
pods		1	4
requests.cpu	200m	1
requests.memory	200Mi	1Gi

Expected results:
3. The used quota = [effective init request/limit], as [effective init request/limit] > [sum of app container request/limit]

Additional info:
https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/container-init.md#resources

Comment 1 Clayton Coleman 2016-07-26 02:11:54 UTC
Fixed in https://github.com/openshift/origin/pull/10028

Comment 2 DeShuai Ma 2016-07-28 09:05:47 UTC
wait the pr to merge,then will verify this bug.

Comment 3 Weihua Meng 2016-08-04 03:15:44 UTC
Fixed.
openshift v3.3.0.14
kubernetes v1.3.0+57fb9ac
etcd 2.3.0+git

# oc describe quota compute-resources
Name:		compute-resources
Namespace:	test1
Resource	Used	Hard
--------	----	----
limits.cpu	500m	2
limits.memory	400Mi	2Gi
pods		1	4
requests.cpu	400m	1
requests.memory	300Mi	1Gi


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