Martin Sivák has posted comments on this change. Change subject: core: positive affinity breaks maintenancing a host ......................................................................
Patch Set 1: (1 comment) http://gerrit.ovirt.org/#/c/26623/1/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 82: Set<Guid> acceptableHosts = new HashSet<Guid>(); Line 83: // Group all hosts for VMs with positive affinity Line 84: for (Guid id : allVmIdsPositive) { Line 85: VM runVm = runningVMsMap.get(id); Line 86: if (runVm != null && runVm.getRunOnVds() != null && hostMap.get(runVm.getRunOnVds()) != null > I introduce some-kind of different flow here... I didn't check that the Run So the logic behind this is that if the host is going to maintenance the acceptableHosts will end up empty and we will fill it with all other hosts as valid destinations? If that is true, explain the logic in the comment please. Also I have two questions: When is the runOnVds changed to the new host? What happens when there are two or more VMs? Will they end up on the same host? Line 87: // when a host preparing for maintenance, we should ignore the positive affinity (without that we Line 88: // can't migrate). Line 89: && hostMap.get(runVm.getRunOnVds()).getStatus() != VDSStatus.PreparingForMaintenance) { Line 90: acceptableHosts.add(runVm.getRunOnVds()); -- To view, visit http://gerrit.ovirt.org/26623 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7282a9e1c87b30c14869170ed7fb5b9276fad33e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@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