Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1268373

Summary: Enforce engine VM memory configuration against available memory
Product: [oVirt] ovirt-hosted-engine-setup Reporter: Simone Tiraboschi <stirabos>
Component: UXAssignee: Rafael Martins <rmartins>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.3.0CC: bmcclain, bugs, didi, lveyde, mavital, rgolan, rmartins, sbonazzo, stirabos, ylavi
Target Milestone: ovirt-3.6.1Keywords: Triaged, ZStream
Target Release: 1.3.1Flags: rule-engine: ovirt-3.6.z+
bmcclain: planning_ack+
sbonazzo: devel_ack+
istein: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
ovirt-hosted-engine-setup now validates the amount of memory to be used by hosted-engine virtual machine against the memory available in the host system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-23 09:19:20 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: 1284979    

Description Simone Tiraboschi 2015-10-02 17:24:01 UTC
Description of problem:
Currently there is no explicit check about the required memory for the engine VM against real free memory.


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

How reproducible:
100%

Steps to Reproduce:
1. Try to deploy an engine VM with memory > than the physical available
2.
3.

Actual results:
The input is accepted but the VM refuses to start and we simply print
[ ERROR ] Failed to execute stage 'Closing up': The VM is not powering up: please check VDSM logs

Expected results:
It should validate the user input accepting only valid values (with a safe margin for host OS) and printing an hint on invalid value.

Additional info:
There is just a warning against the suggested minimum requirement

Comment 1 Red Hat Bugzilla Rules Engine 2015-10-19 10:51:46 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 2 Yaniv Lavi 2015-11-02 15:09:31 UTC
What does the ha service do in this situation. Are we safe there?

Comment 3 Roy Golan 2015-11-17 13:20:36 UTC
(In reply to Yaniv Dary from comment #2)
> What does the ha service do in this situation. Are we safe there?

Am not sure what you're asking by "safe"

The ha tries to run a vm with the amount of memory told. If Qemu can't maloc this amount for the VM, it will simply fail.

Comment 4 Yaniv Lavi 2015-11-17 13:24:58 UTC
(In reply to Roy Golan from comment #3)
> (In reply to Yaniv Dary from comment #2)
> > What does the ha service do in this situation. Are we safe there?
> 
> Am not sure what you're asking by "safe"
> 
> The ha tries to run a vm with the amount of memory told. If Qemu can't maloc
> this amount for the VM, it will simply fail.

What will happen if no host with enough memory exists?

Comment 5 Simone Tiraboschi 2015-11-18 13:16:59 UTC
HA is subtracting some points from the host score if the free memory value is low so the host with more free memory in general will win.
After a full shutdown no other VMs should be there so restarting the engine VM should not be an issue.
We can have an issue if the host where the engine VM was running goes down and no other alive host has enough memory for it: I don't think that the HA agent is able to shutdown any other VM to automatically restart the engine.

Roy, do we have any automatic memory reservation criteria based on hosted-engine requirements?

Comment 6 Artyom 2016-02-18 15:21:39 UTC
we have ha reservation feature, but first I do not sure if it will recognize HE vm as HA vm and also it does not prevent from starting vm and take all memory from host, it just show some warning message

Comment 7 Artyom 2016-02-18 15:22:27 UTC
Verified on ovirt-hosted-engine-setup-1.3.3.3-1.el7ev.noarch

Please specify the memory size of the VM in MB [Defaults to appliance OVF value: 4096]: -1
[WARNING] Minimum requirements for memory size not met
          Continue with specified memory size? (Yes, No) [No]: 
          Please specify the memory size of the VM in MB [Defaults to appliance OVF value: 4096]: 1024
[WARNING] Minimum requirements for memory size not met
          Continue with specified memory size? (Yes, No) [No]: No
          Please specify the memory size of the VM in MB [Defaults to appliance OVF value: 4096]: a
[ ERROR ] Invalid memory size specified: a
          Please specify the memory size of the VM in MB [Defaults to appliance OVF value: 4096]: dasda
[ ERROR ] Invalid memory size specified: dasda
          Please specify the memory size of the VM in MB [Defaults to appliance OVF value: 4096]: 65536
[WARNING] Invalid memory size specified: 65536, while only 15005 are available on the host