This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1258780 - Incorrect selection of vm for migration by CpuAndMemory balance module
Incorrect selection of vm for migration by CpuAndMemory balance module
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.6.0
All Linux
high Severity urgent
: ovirt-3.6.0-rc3
: 3.6.0
Assigned To: Martin Sivák
Artyom
: Triaged
Depends On:
Blocks: 736808
  Show dependency treegraph
 
Reported: 2015-09-01 05:32 EDT by Artyom
Modified: 2016-04-19 21:31 EDT (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Updated the balancing module code to ensure that clusters are balanced sooner. The balancing module will now attempt to migrate a different virtual machine if it detects that the current candidate will not fit on any destination host.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-19 21:31:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: SLA
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
engine log (156.48 KB, text/plain)
2015-09-24 10:01 EDT, Artyom
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 45574 master MERGED core: improve balance selection of vm for migration Never
oVirt gerrit 46084 ovirt-engine-3.6 MERGED core: improve balance selection of vm for migration Never
oVirt gerrit 47169 None ABANDONED core: improve balance selection of vm for migration Never
oVirt gerrit 47170 ovirt-engine-3.6.0 MERGED core: improve balance selection of vm for migration Never

  None (edit)
Description Artyom 2015-09-01 05:32:33 EDT
Description of problem:
Now in CpuAndMemory balance module possible situation, when engine have valid vm for migration, but vm will not selected for migration

Version-Release number of selected component (if applicable):
rhevm-3.6.0-0.12.master.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. Have two hosts(host_1 and host_2)
2. Run two vms on host_1(vm_1 and vm_2) vm_1 have 8Gb and 0% cpu load; vm_2 have 1Gb and 5% cpu load
3. Run vm_3 on host_2, vm_3 have 8Gb memory
4. Load host_2 cpu to 50%
5. Change cluster policy to power saving with parameters:
CpuOverCommitDurationMinutes = 2
HighUtilization = 75
LowUtilization = 35
MinFreeMemoryForUnderUtilized = 12GB
MaxFreeMemoryForOverUtilized = 4GB

Actual results:
vm_2 not migrate to host_2

Expected results:
vm_2 must be migrated on host_1

Additional info:
Comment 1 Artyom 2015-09-24 10:00:44 EDT
Scheduler policy balancing module (power saving or event distribution) must guarantee,
that as much as possible VMs will run on "normal utilized" hosts.
In case of a VM, that run on "under utilized" host,
and this VM can be migrated to a "normal utilized host (without over utilized host CPU and memory), scheduler must migrate it.

In the scenario, mentioned in the description, I showed that because of incorrect condition in code,
scheduler from two vms, that host_1 have, will first check vm_1,
see that it will over utilize host_2 memory and migration will not happen.
The scheduler then do not check vm_2 to see if it will over utilize host_2 memory - and this is the bug.
As a result we will have state, when vm_2 never will be chosen for migration.
Comment 2 Artyom 2015-09-24 10:01 EDT
Created attachment 1076556 [details]
engine log
Comment 4 Artyom 2015-10-25 10:03:48 EDT
Verified on rhevm-3.6.0.2-0.1.el6.noarch

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