Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1359699 - [infrastructure_public_278]Quota should properly calculate Init containers request and limits value.
[infrastructure_public_278]Quota should properly calculate Init containers re...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
3.3.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Andy Goldstein
DeShuai Ma
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-25 06:20 EDT by DeShuai Ma
Modified: 2016-09-19 10:30 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-19 10:30:16 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1933 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 09:24:36 EDT

  None (edit)
Description DeShuai Ma 2016-07-25 06:20:30 EDT
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-25 22:11:54 EDT
Fixed in https://github.com/openshift/origin/pull/10028
Comment 2 DeShuai Ma 2016-07-28 05:05:47 EDT
wait the pr to merge,then will verify this bug.
Comment 3 Weihua Meng 2016-08-03 23:15:44 EDT
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.