Bug 1797769

Summary: Resource Requirements specDescriptor fields- cpu or memory is injected with empty value into YAML [openshift-4.4]
Product: OpenShift Container Platform Reporter: Cyril <cajieh>
Component: Management ConsoleAssignee: Cyril <cajieh>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: aos-bugs, bpeterse, hasha, jokerman
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Missing requirement Consequence: Fix: Yes Result: Works as expected
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-13 21:58:57 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:
Attachments:
Description Flags
Yaml editor
none
Details view none

Description Cyril 2020-02-03 20:13:35 UTC
Description of problem: The "resourceRequirements" specDescriptor fields- cpu or memory is injected with empty value into YAML when user enters either one or the other.


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


How reproducible:


Steps to Reproduce:
1. Installed "Couchbase Operator" from 'OperatorHub' view
2. Go to 'Installed Operators' view and find "Couchbase Operator"
3. Click "Create instance" link for "Couchbase Cluster"
4. Click "Edit form" link
5. Find "Resource Requirements" widget
6. Enter value for CPU only and submit form
7. Open YAML editor

Actual results:
Memory field is injected with empty value to YAML 

Expected results:
Memory field shouldn't be injected with empty value to YAML 

Additional info:

Comment 1 Cyril 2020-02-03 20:32:57 UTC
Created attachment 1657422 [details]
Yaml editor

Comment 2 Cyril 2020-02-04 19:35:14 UTC
Created attachment 1657641 [details]
Details view

Comment 5 shahan 2020-02-17 03:47:43 UTC
create cr resource such as etcdcluster via form, enter value for CPU only and submit form.
Then got the yaml as bellow:

spec:
  pod:
    resources:
      limits:
        cpu: 500m
        memory: 50mi
      requests:
        cpu: 500m
        memory: 50mi

Verified this bug. 4.4.0-0.nightly-2020-02-16-205302

Comment 7 Cyril 2020-02-17 13:33:34 UTC
This bug PR depends on PR- https://github.com/openshift/console/pull/4191 to work as expected. The PR https://github.com/openshift/console/pull/4191 would be merge soon.

Comment 9 errata-xmlrpc 2020-05-13 21:58:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0581