Bug 1520382

Summary: The memory value (in bytes) loaded from the template causes the host provisioning to fail
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: Compute Resources - RHEVAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: bbuckingham, dlezzoum, ehelms, inecas, mshira, orabin, sjagtap
Target Milestone: UnspecifiedKeywords: PrioBumpQA, Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.15.6.27-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:54:37 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
screenshot of UI
none
Error while provisioning none

Description Nikhil Kathole 2017-12-04 11:50:14 UTC
Created attachment 1362646 [details]
screenshot of UI

Description of problem: The memory loaded from the template is in bytes (that template has 1 GB or 1024 MB of RAM), this cause the host provisioning to fail.The error while provisioning "Failed to create a compute rhevm1 (RHEV) instance."

Version-Release number of selected component (if applicable):Satellite 6.3 snap 27


How reproducible:always


Steps to Reproduce:
1. Goto Infrastructure > Compute resources
2. Create a RHEV compute resource
3. Select the created compute resource
4. Select Compute profiles
5. Select a profile
6. select a template

Actual results: The memory value sets in bytes causing the host provisioning to fail.

Expected results: The memory value should set correctly.


Additional info:The work around is to visit Virtual Machine tab at host creation stage and correct that value.

Comment 1 Nikhil Kathole 2017-12-04 11:50:47 UTC
Created attachment 1362647 [details]
Error while provisioning

Comment 3 Djebran Lezzoum 2017-12-04 12:15:13 UTC
The main reason is when you save this profile (you notice that memory is 0 Bytes in compute resource profile) and if you open it again , you will notice that the memory field is empty

Comment 4 Djebran Lezzoum 2017-12-05 13:50:05 UTC
Info: Think the memory field when updated does not trigger the change event (and consequently the hidden field is not updated), we are facing the same issue in automation when setting that value and we have to trigger that change event explicitly by executing "memory_input.dispatchEvent(new Event('change'));".

So when the data is loaded from template the script update that field but the change event is not triggered.

Comment 5 Sanket Jagtap 2017-12-08 10:20:29 UTC
The also, affects image based provisioning.

Reproducer:
1. Create a valid Compute profile for RHEV without template (Do not select any  template)
2. Add memory to compute profile 1GB 
3. Create a host, Select created Compute profile, Go to virtual machine tab ,
    Memory value is 1GB
4. Go to operating System Tab , select Image based provisioning. Again, visit the 
   Virtual machine tab, memory value is overridden to memory in bytes.
5. This fails the provisioning of the box.

Workaround - when using Compute profile with Image based provisioning, go to Virtual machine tab to correct the memory value.

Comment 7 Shira Maximov 2017-12-11 07:38:55 UTC
Created redmine issue http://projects.theforeman.org/issues/21922 from this bug

Comment 8 Satellite Program 2017-12-31 11:22:31 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21922 has been resolved.

Comment 11 Sanket Jagtap 2018-01-16 12:58:37 UTC
Build: Satellite 6.3.0 snap32

The bytes memory is converted to Mb's and/or Gb's

Marking as verified

Comment 12 Satellite Program 2018-02-21 16:54:37 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/RHSA-2018:0336