Gilad Chaplik has posted comments on this change.

Change subject: core: Change how Affinity behaves if the assumptions are invalid
......................................................................


Patch Set 3:

(2 comments)

This patch touches extremely sensitive code. please separate re-factoring to 
another patch.

http://gerrit.ovirt.org/#/c/26619/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/VmAffinityFilterPolicyUnit.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/VmAffinityFilterPolicyUnit.java:

Line 98:         // contradicting rules to the log
Line 99:         unacceptableHosts.retainAll(acceptableHosts);
Line 100:         for (Guid id: unacceptableHosts) {
Line 101:             log.warnFormat("Host {1} ({2}) belongs to both positive 
and negative affinity list" +
Line 102:                     " while scheduling VM {3} ({4})",
both? when acceptableHosts.isEmpty() == true, this log msg is inaccurate.
Line 103:                     hostMap.get(id).getName(), id.toString(),
Line 104:                     vm.getName(), vm.getId());
Line 105:         }
Line 106: 


Line 111:         else if (acceptableHosts.size() > 1) {
Line 112:             log.warnFormat("Invalid affinity situation was detected 
while scheduling VM {1} ({2})." +
Line 113:                     " VMs belonging to the same affinity groups are 
running on more than one host.",
Line 114:                     vm.getName(), vm.getId());
Line 115:         }
Here acceptableHosts.size() > 1, means we should filter out all hosts.

but in line 129 we do not.
Line 116: 
Line 117:         // Remove hosts that contain VMs with negaive affinity to the 
currently scheduled Vm
Line 118:         for (Guid id : allVmIdsNegative) {
Line 119:             VM runVm = runningVMsMap.get(id);


-- 
To view, visit http://gerrit.ovirt.org/26619
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I506bcb6e96c622694e6bf7b8ce7a0f54a82e5713
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Jiří Moskovčák <jmosk...@redhat.com>
Gerrit-Reviewer: Kobi Ianko <k...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to