From 7439a9bbec6cd9f7b61ab2035eaf668c9408f674 Mon Sep 17 00:00:00 2001 From: Bharat Kumar Date: Tue, 15 Sep 2015 14:24:13 +0530 Subject: [PATCH] CLOUDSTACK-8851 Redundant VR getting started in the same cluster or host even when there are suitable hosts available --- engine/orchestration/src/com/cloud/vm/VmWorkStart.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkStart.java b/engine/orchestration/src/com/cloud/vm/VmWorkStart.java index bb9f375e267..814e78c2830 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkStart.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkStart.java @@ -56,7 +56,7 @@ public class VmWorkStart extends VmWork { public DeploymentPlan getPlan() { - if (podId != null || clusterId != null || hostId != null || poolId != null || physicalNetworkId != null) { + if (podId != null || clusterId != null || hostId != null || poolId != null || physicalNetworkId != null || avoids !=null) { // this is ugly, to work with legacy code, we need to re-construct the DeploymentPlan hard-codely // this has to be refactored together with migrating legacy code into the new way ReservationContext context = null; @@ -70,6 +70,7 @@ public class VmWorkStart extends VmWork { DeploymentPlan plan = new DataCenterDeployment( dcId, podId, clusterId, hostId, poolId, physicalNetworkId, context); + plan.setAvoids(avoids); return plan; }