Bug 1421713

Summary: VM pinned to host is started on another host
Product: [oVirt] ovirt-engine Reporter: Petr Matyáš <pmatyas>
Component: BLL.VirtAssignee: Martin Sivák <msivak>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: high Docs Contact:
Priority: high    
Version: 4.1.1CC: astepano, bugs, mgoldboi, pmatyas, tjelinek
Target Milestone: ovirt-4.1.1Keywords: AutomationBlocker, Regression, Triaged
Target Release: 4.1.1.3Flags: rule-engine: ovirt-4.1+
rule-engine: blocker+
msivak: devel_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Change in policy unit factors (weight normalization) set preferred host policy unit as important as all the other units. Consequence: Other units (CPU, memory, affinity, ..) were able to outvote the Start running on list. Fix: The multiplication factor for Preferred host policy unit was set to 99. Result: A VM with preferred hosts will primarily use hosts from that list unless they are really really bad (100 other hosts are better according to other policy units).
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-21 09:47:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Host assign none

Description Petr Matyáš 2017-02-13 13:58:40 UTC
Description of problem:
I have a VM that should start on host_1, but is started on host_2 instead. In log I could find that it was started there because host_1 was not accessible, but I can migrate the VM there afterwards with no problem.

Version-Release number of selected component (if applicable):
4.1.1-1

How reproducible:
always

Steps to Reproduce:
1. set a VM to run on host-1
2. have other VMs running on host-1, but leave enough resources for the VM that is pinned there
3. start the VM

Actual results:
VM is started on different host

Expected results:
VM should be started on host it's pinned to if there are enough resources for it

Additional info:

Comment 2 Martin Sivák 2017-02-13 16:23:42 UTC
> Steps to Reproduce:
> 1. set a VM to run on host-1
Can you elaborate? What exactly did you do?

Comment 3 Petr Matyáš 2017-02-13 16:53:17 UTC
This happens when you set host in 'start on host' in host edit dialogue and have 'migration possible' or 'only manual migration possible' set in migration policy and start the VM.

You can fix this by setting higher weight in scheduling policy or by setting the the host in run once dialogue or choose 'no migration possible' in migration policy.

Comment 4 Red Hat Bugzilla Rules Engine 2017-02-14 15:07:12 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 5 Martin Sivák 2017-03-01 11:46:39 UTC
*** Bug 1426740 has been marked as a duplicate of this bug. ***

Comment 6 Andrei Stepanov 2017-03-01 11:49:40 UTC
Fails for ovirt-engine-4.1.1.2-0.1.el7.noarch

Comment 7 Martin Sivák 2017-03-01 11:54:29 UTC
(In reply to Andrei Stepanov from comment #6)
> Fails for ovirt-engine-4.1.1.2-0.1.el7.noarch

- Can you check whether the cluster policy shows 99 next to the PreferredHosts cluster policy?
- Does the VM start on your host when you use Run Once and select the host?
- Can you attach the log with DEBUG enabled according to the testing section of: http://www.ovirt.org/develop/release-management/features/sla/scheduling-weight-normalization/

Comment 8 Andrei Stepanov 2017-03-01 13:44:19 UTC
Created attachment 1258683 [details]
Host assign

Comment 9 Martin Sivák 2017-03-01 14:56:00 UTC
The status of this bug is supposed to be MODIFIED only. The patch was merged and bug moved to modified after tagging for 4.1.1.2 but before the CI moved all modified bugs to ON_QA (including this one).

The fix will be part of the build tomorrow.

Comment 10 Artyom 2017-03-13 08:40:00 UTC
Verified on rhevm-4.1.1.4-0.1.el7.noarch

"Preferred Hosts" - weight module now has the factor equals to 99 for all default policies.