Bug 1034797

Summary: [RHEVM] setup should be more tolerant detecting available memory
Product: Red Hat Enterprise Virtualization Manager Reporter: Martin Pavlik <mpavlik>
Component: ovirt-engine-setupAssignee: Alex Lourie <alourie>
Status: CLOSED UPSTREAM QA Contact: Leonid Natapov <lnatapov>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, bazulay, dfediuck, gklein, iheim, lyarwood, oschreib, pstehlik, Rhev-m-bugs, rhod, riel, sbonazzo, srevivo, yeylon
Target Milestone: ---Keywords: EasyFix
Target Release: 3.3.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: integration
Fixed In Version: is27 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-15 11:54:42 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:
Bug Depends On:    
Bug Blocks: 1049022    

Description Martin Pavlik 2013-11-26 14:14:24 UTC
Description of problem:
At the moment minimum amount of ram for hosted engine VM defaults to 4096 MB

Please specify the memory size of the VM in MB [Defaults to minimum requirement: 4096 MB

if VM with 4096MB RAM is created

engine-setup complaints that machine has less than recommended minimum amount of RAM (4096MB) for running engine (system can see only 3830MB RAM)

Version-Release number of selected component (if applicable):
Red Hat Enterprise Virtualization Manager Version: 3.3.0-0.36.beta1.el6ev 

How reproducible:
always

Steps to Reproduce:
1.install self hosted engine
2. when asked about amount of RAM for VM with hosted engine use default minimum 


Actual results:
engine-setup complaints about lack of RAM

Expected results:
VM for engine is by default created with enough RAM for engine-setup

Additional info:
complete deploy procedure
http://www.ovirt.org/Hosted_Engine_Howto#Fresh_Install

Comment 1 Sandro Bonazzola 2013-11-27 08:29:46 UTC
It seems that the amount of RAM visible from inside the VM has changed from the past.
engine-setup (from rhevm-setup package) is checking for 4096MB as minimum with a 5% of tolerance. So minimum should have been something like 3891.
System now can see only 3830MB RAM so qemu is showing less RAM than before.

Is this a wanted change in qemu or a regression in it?
If it's something we want to support anyway, we should change the check in engine-setup, not requiring more ram in ovirt-hosted-engine-setup.

Comment 2 Ronen Hod 2013-12-01 17:43:45 UTC
I have to admit that I do not know how MemTotal in /proc/meminfo is computed, but certainly it does not return the amount of physical memory, also on bare metal.
You probably need to modify this check.

Comment 4 Sandro Bonazzola 2013-12-05 13:34:20 UTC
(In reply to Ronen Hod from comment #2)
> I have to admit that I do not know how MemTotal in /proc/meminfo is
> computed, but certainly it does not return the amount of physical memory,
> also on bare metal.
> You probably need to modify this check.

MemTotal is ~= physical - reserved

I think we can't rely on physical (dmidecode --type=17) because admin may limit memory usage by kernel command line.

I think we can just use a 10% tolerance here instead of 5%.
Unless someone can provide a real number under which the application won't work anyway.

If this is accepted, this is an EasyFix.

Comment 5 Andrew Cathrow 2013-12-05 13:50:38 UTC
Acking the fix. Would be nice to understand why this changed though - was there a difference in the amount of RAM reserved for QXL?

Comment 6 Sandro Bonazzola 2013-12-10 11:35:58 UTC
patch merged on upstream master and 3.3 branch

Comment 7 Shai Revivo 2013-12-15 11:54:42 UTC
This bug was fixed and is slated to be in the upcoming version. As we are focusing our testing at this phase on severe bugs, this bug was closed without going through its verification step.