Bug 1303547 - [userinterface_public_464]Should check the requests/limits sum of all containers in pod template
[userinterface_public_464]Should check the requests/limits sum of all contain...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Management Console (Show other bugs)
3.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Samuel Padgett
yapei
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-01 04:35 EST by Xingxing Xia
Modified: 2016-09-19 09:52 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-19 09:52:08 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)

  None (edit)
Description Xingxing Xia 2016-02-01 04:35:02 EST
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 10:12:12 EST
Fix included in

https://github.com/openshift/origin/pull/6853
Comment 2 Xingxing Xia 2016-02-13 21:53:28 EST
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.