Red Hat Bugzilla – Bug 1258780
Incorrect selection of vm for migration by CpuAndMemory balance module
Last modified: 2016-04-19 21:31:54 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):
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
vm_2 not migrate to host_2
vm_2 must be migrated on host_1
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.
Created attachment 1076556 [details]
Verified on rhevm-18.104.22.168-0.1.el6.noarch