Bug 1658653 - [downstream clone - 4.2.8] Scheduler computes incorrect CPU load of the host where the scheduled VM is running
Summary: [downstream clone - 4.2.8] Scheduler computes incorrect CPU load of the host ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.3.0
: ---
Assignee: Andrej Krejcir
QA Contact: Liran Rotenberg
URL:
Whiteboard:
Depends On: 1653752
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-12 15:47 UTC by RHV bug bot
Modified: 2019-01-25 11:13 UTC (History)
7 users (show)

Fixed In Version: ovirt-engine-4.2.8.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1653752
Environment:
Last Closed: 2019-01-17 13:00:41 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 96122 0 master MERGED scheduler: Fix subtracting CPU load from host where VM is running 2018-12-19 10:04:40 UTC
oVirt gerrit 96358 0 ovirt-engine-4.2 MERGED scheduler: Fix subtracting CPU load from host where VM is running 2019-01-07 09:17:27 UTC

Description RHV bug bot 2018-12-12 15:47:32 UTC
+++ This bug is an upstream to downstream clone. The original bug is: +++
+++   bug 1653752 +++
======================================================================

Description of problem:
When migrating a VM, the scheduler subtracts the CPU load of the VM from the host where it is currently running. So that the host can appear as if the VM is not running there.

This calculation is incorrect when the cluster does not have option 'count threads as cores' set.

Version-Release number of selected component (if applicable):
4.3 and 4.2

Steps to Reproduce:
1. Unset the 'count threads as cores' option for the cluster.
2. Have 2 hosts (host1, host2) with 2 threads per CPU core.
3. Run 2 VMs (VM1, VM2) on host1. With the same number of cores as the host, but 1 thread per core.
4. Add VM1 and host1 to an affinity group, positive, enforcing.
5. Create 100% CPU load on VM2. (for example by running: python -c 'while True: pass')
6. Enable EvenDistribution balancing on the cluster. Set HighUtilization to 50.
7. Wait to see if the VM2 will be migrated to host2 by the balancing.

Actual results:
VM2 is not migrated. 
Scheduler incorrectly computes the CPU load of host1, so the host is considered the best candidate for migration and the VM does not migrate.

Expected results:
VM2 migrates to host2.

(Originally by Andrej Krejcir)

Comment 1 RHV bug bot 2019-01-09 14:23:07 UTC
WARN: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{'rhevm-4.2.z': '?'}', ]

For more info please contact: rhv-devops: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{'rhevm-4.2.z': '?'}', ]

For more info please contact: rhv-devops

Comment 2 Raz Tamir 2019-01-09 15:30:34 UTC
Martin,

Could you please take care of acking this bug?

Thanks

Comment 3 Liran Rotenberg 2019-01-15 11:35:00 UTC
Tested on: ovirt-engine-4.2.8.2-0.1.el7ev.noarch
Forth to https://bugzilla.redhat.com/show_bug.cgi?id=1653752#c2
Moving back to assign.

Comment 4 Ryan Barry 2019-01-17 13:00:41 UTC
Closing -- leaving tracking in the upstream bug for 4.3


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