Bug 1303547 - [userinterface_public_464]Should check the requests/limits sum of all containers in pod template
Summary: [userinterface_public_464]Should check the requests/limits sum of all contain...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Management Console
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-01 09:35 UTC by Xingxing Xia
Modified: 2016-09-19 13:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-19 13:52:08 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Xingxing Xia 2016-02-01 09:35:02 UTC
Description of problem:
In web console, when editing request/limit values for dc and standalone rc that have multiple containers, it should check the requests/limits sum of all containers < Pod limit max, but it does not.

Version-Release number of selected component (if applicable):
fork_ami_openshift3_userinterface_public_464_200

How reproducible:
Always

Steps to Reproduce:
1. oc login, create a project and LimitRange in it
$ cat > limits.yaml <<EOF
apiVersion: v1
kind: LimitRange
metadata:
  name: limits
spec:
  limits:
  - max:
      cpu: 500m
      memory: 750Mi
    min:
      cpu: 10m
      memory: 5Mi
    type: Pod
  - default:
      cpu: 130m
      memory: 120Mi
    defaultRequest:
      cpu: 110m
      memory: 100Mi
    maxLimitRequestRatio:
      cpu: 10
      memory: 8
    max:
      cpu: 400m
      memory: 750Mi
    min:
      cpu: 10m
      memory: 5Mi
    type: Container
EOF

$ oc create -f limits.yaml -n <project> --config=./admin.kubeconfig

2. Create a standalone rc that has multiple containers
$ cat > rc_containers.yaml << EOF
apiVersion: v1
kind: ReplicationController
metadata:
  name: myrc
spec:
  replicas: 1
  selector:
    run: myrc
  template:
    metadata:
      labels:
        run: myrc
    spec:
      containers:
      - image: yapei/hello-openshift
        imagePullPolicy: IfNotPresent
        name: hello-openshift
        ports:
        - containerPort: 8080
          protocol: TCP
      - image: yapei/hello-openshift-fedora
        imagePullPolicy: IfNotPresent
        name: hello-openshift-fedora
        ports:
        - containerPort: 8081
          protocol: TCP
EOF

$ oc create -f rc_containers.yaml

3. In web console, browse Deployments --> Click the standalone rc --> Click edit button in the right --> Set Resource Limits --> Set all containers' CPU Request=260m, Limit=300m, so that 260 + 260 > 500

Actual results:
3. The "Save" button can be clicked.

Expected results:
3. Because requests/limits sum of all containers > Pod limit max, the "Save" button should be gray and prohibited.


Additional info:

Comment 1 Samuel Padgett 2016-02-04 15:12:12 UTC
Fix included in

https://github.com/openshift/origin/pull/6853

Comment 2 Xingxing Xia 2016-02-14 02:53:28 UTC
Verified against devenv-rhel7_3421 (openshift/oc v1.1.2-256-g2903c81
kubernetes v1.2.0-origin)
The test result in step 3 is: the "Save" button is gray and prohibited, and there are prompts like "CPU request total for all containers is greater than pod maximum (500 millicores)", " CPU limit total for all containers is greater than pod maximum (500 millicores)"


The bug is fixed, so move to VERIFIED.


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