Bug 1300245

Summary: hosted-engine setup proposes as a default to use all the available RAM for the engine VM also if bigger than the value in the appliance OVF
Product: [oVirt] ovirt-hosted-engine-setup Reporter: Simone Tiraboschi <stirabos>
Component: Plugins.GeneralAssignee: Rafael Martins <rmartins>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.3.2.2CC: bugs, dfediuck, didi, gklein, lveyde, mavital, rmartins, sbonazzo, stirabos, ylavi
Target Milestone: ovirt-3.6.3Keywords: Triaged
Target Release: 1.3.3.1Flags: rule-engine: ovirt-3.6.z+
rule-engine: exception+
ylavi: planning_ack+
dfediuck: devel_ack+
mavital: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Comparison of memory values stored as string and integer. Consequence: hosted-engine-setup proposes as a default to use all the available RAM for the engine VM also if bigger than the value in the appliance OVF. Fix: Always convert memory values to integer before using for comparisons. Result: hosted-engine-setup proposes reasonable values of memory.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-18 11:22:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1305885    

Description Simone Tiraboschi 2016-01-20 10:44:23 UTC
Description of problem:
hosted-engine setup proposes as a default to use all the available RAM for the engine VM also if bigger than the value in the appliance OVF.

Example:
256 GB host, 16 GB recommended in the engine-appliance OVF:
Please specify the memory size of the VM in MB [Defaults to maximum available: 255067]: 


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

How reproducible:
100%

Steps to Reproduce:
1. hosted-engine --deploy on a system with more than 16GB of RAM
2.
3.

Actual results:
Please specify the memory size of the VM in MB [Defaults to maximum available: 255067]: 

Expected results:
Please specify the memory size of the VM in MB [Defaults to appliance OVF value: 16384]: 

Additional info:

Probably is the result of a string vs integer comparison.
Please ensure that we are always handling it as an integer (also if the user enters a custom value and we gather it via dialog.queryEnvKey )

Comment 1 Artyom 2016-02-17 13:20:40 UTC
Verified on ovirt-hosted-engine-setup-1.3.3.3-1.el7ev.noarch