Bug 1545011

Summary: [trello EuQHe0LT]Clear CPU Request Target value will remove CPU Request Target input on DC edit autoscaler page
Product: OpenShift Container Platform Reporter: Yadan Pei <yapei>
Component: Management ConsoleAssignee: bpeterse
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.9.0CC: aos-bugs, jokerman, mmccomas, spadgett, xiaocwan
Target Milestone: ---Flags: bpeterse: needinfo+
Target Release: 3.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-22 13:01:20 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 Yadan Pei 2018-02-14 03:03:12 UTC
Description of problem:
Create HPA on web console use new v1 apiversion and set CPU Request as 80% by default, on edit autoscaler page, clear the CPU Request Target value will remove the input

Version-Release number of selected component (if applicable):
v3.9.0-0.42.0 

How reproducible:
ALways

Steps to Reproduce:
1.Create a project with cakephp-mysql template
2.Create AutoScaler for one of DC ' cakephp-mysql-persistent'
3.Edit Autoscaler after a HPA is created
4.On edit autoscaler page, clear the value in CPU Request Target with backspace 

Actual results:
4.After all values are cleared, CPU Request Target input was removed from page

Expected results:
4.Should keep CPU Request Target for input, and it's the target we aim at
"should not break if it sees an HPA with a targetCPUPercentage set to 0" in trello card EuQHe0LT

Additional info:

Comment 1 bpeterse 2018-02-14 14:52:14 UTC
Let's see, the interpretation of "should not break" was fairly literal, the editor previously only handled the v1 API so getting back v2beta1 objects shouldn't break it [render the page unusable/unresponsive or throw an error]. 

We now tolerate the newer API, but let me look at this & make sure it works as expected.

Comment 2 bpeterse 2018-02-14 17:16:40 UTC
PR opened: https://github.com/openshift/origin-web-console/pull/2802

Comment 3 bpeterse 2018-02-15 15:33:36 UTC
PR merged.

Comment 5 XiaochuanWang 2018-02-22 02:45:37 UTC
This is not reproduced on 
OpenShift Master:         v3.9.0-0.45.0 
OpenShift Web Console:    v3.9.0-0.47.0