Bug 1268373 - Enforce engine VM memory configuration against available memory [NEEDINFO]
Enforce engine VM memory configuration against available memory
Status: CLOSED CURRENTRELEASE
Product: ovirt-hosted-engine-setup
Classification: oVirt
Component: UX (Show other bugs)
1.3.0
Unspecified Unspecified
medium Severity medium (vote)
: ovirt-3.6.1
: 1.3.1
Assigned To: Rafael Martins
Artyom
: Triaged, ZStream
Depends On:
Blocks: 1284979
  Show dependency treegraph
 
Reported: 2015-10-02 13:24 EDT by Simone Tiraboschi
Modified: 2016-02-23 04:19 EST (History)
10 users (show)

See Also:
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 04:19:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Integration
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
ylavi: needinfo? (rgolan)
rule-engine: ovirt‑3.6.z+
bmcclain: planning_ack+
sbonazzo: devel_ack+
istein: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 47028 master MERGED packaging: setup: validate available memory for virtual machine Never
oVirt gerrit 47782 ovirt-hosted-engine-setup-1.3 MERGED packaging: setup: validate available memory for virtual machine Never
oVirt gerrit 47799 master MERGED packaging: setup: floor max memory available to 0, if negative. Never
oVirt gerrit 48741 ovirt-hosted-engine-setup-1.3 MERGED packaging: setup: floor max memory available to 0, if negative. Never

  None (edit)
Description Simone Tiraboschi 2015-10-02 13:24:01 EDT
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 06:51:46 EDT
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 (Dary) 2015-11-02 10:09:31 EST
What does the ha service do in this situation. Are we safe there?
Comment 3 Roy Golan 2015-11-17 08:20:36 EST
(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 (Dary) 2015-11-17 08:24:58 EST
(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 08:16:59 EST
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 10:21:39 EST
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 10:22:27 EST
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

Note You need to log in before you can comment on or make changes to this bug.