Bug 1413842

Summary: Unit drop-down choices are ignored in the web page to edit resource limits
Product: OpenShift Container Platform Reporter: Xingxing Xia <xxia>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.5.0CC: aos-bugs, jokerman, mmccomas, spadgett, tdawson
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-08 13:12:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xingxing Xia 2017-01-17 06:09:21 UTC
Description of problem:
Unit drop-down choices are ignored in the web page to edit resource limits

Version-Release number of selected component (if applicable):
openshift v3.5.0.5+8f2840d

How reproducible:
Always

Steps to Reproduce:
1. Create DC
$ oc new-app openshift/hello-openshift
2. On DC page, click Actions --> Edit Resources Limits
3. Check unit choices
CPU: Choose Request unit "cores" from drop-down list, set value 1; set Limit value 512 milicores
Memory: Choose Request unit "GiB", set value 1; set Limit value 256 MiB
Then click Save

Actual results:
3. "Save" is not disabled.
After save, check the actual resources limits:
CPU: Request is set 1 milicores, i.e. "cores" is ignored!
Memory: Request is set 1 MiB. In fact, except MiB, the remaining units MB/GB/GiB are ignored

Expected results:
3. "Save" is disabled
In page, CPU and Memory should both prompt error message "Limit can't be less than request ..." as before

Additional info:

Comment 2 Troy Dawson 2017-01-20 23:01:13 UTC
This has been merged into ocp and is in OCP v3.5.0.7 or newer.

Comment 3 Xingxing Xia 2017-01-22 03:22:52 UTC
Verified in OCP v3.5.0.7. Steps in comment 0 now can get the written expected result. And it can save correct values into DC YAML when page saves CPU/Memory with various units. Thanks!