Gilad Chaplik has uploaded a new change for review. Change subject: core: support pin-to-any ......................................................................
core: support pin-to-any Fixing a regression that forces to specify a host for non-migratable VMs. Change-Id: I10d60bb9db2506a63a19f5e75446ddac32b8dc3e Bug-Url: https://bugzilla.redhat.com/1021574 Signed-off-by: Gilad Chaplik <gchap...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PinToHostPolicyUnit.java 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/29/20829/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PinToHostPolicyUnit.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PinToHostPolicyUnit.java index acc3a07..aef9ea8 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PinToHostPolicyUnit.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PinToHostPolicyUnit.java @@ -20,6 +20,11 @@ @Override public List<VDS> filter(List<VDS> hosts, VM vm, Map<String, String> parameters, List<String> messages) { + // allow Pin-To-Any: if the vm isn't running, and doesn't specify any host to be + // pinned, allow to select all hosts. + if (vm.getRunOnVds() == null && vm.getDedicatedVmForVds() == null) { + return hosts; + } if (vm.getMigrationSupport() == MigrationSupport.PINNED_TO_HOST) { for (VDS host : hosts) { if (host.getId().equals(vm.getDedicatedVmForVds())) { -- To view, visit http://gerrit.ovirt.org/20829 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10d60bb9db2506a63a19f5e75446ddac32b8dc3e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Gilad Chaplik <gchap...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches