Skip to content

Commit d543e2a

Browse files
committed
Merge pull request #839 from bvbharatk/CLOUDSTACK-8851
CLOUDSTACK-8851 Redundant VR getting started in the same cluster or hwe are not populating the deployment destination of the previous rvr in the avoid set of the rvr that is being created. This was resulting in both the rvrs getting deployed to same host sometimes even when it could have gone to a different one. Now we are updating the avoids set of the deployment plan to fix this issue. * pr/839: CLOUDSTACK-8851 Redundant VR getting started in the same cluster or host even when there are suitable hosts available Signed-off-by: Remi Bergsma <github@remi.nl>
2 parents a5ca762 + 7439a9b commit d543e2a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

engine/orchestration/src/com/cloud/vm/VmWorkStart.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public VmWorkStart(long userId, long accountId, long vmId, String handlerName) {
5656

5757
public DeploymentPlan getPlan() {
5858

59-
if (podId != null || clusterId != null || hostId != null || poolId != null || physicalNetworkId != null) {
59+
if (podId != null || clusterId != null || hostId != null || poolId != null || physicalNetworkId != null || avoids !=null) {
6060
// this is ugly, to work with legacy code, we need to re-construct the DeploymentPlan hard-codely
6161
// this has to be refactored together with migrating legacy code into the new way
6262
ReservationContext context = null;
@@ -70,6 +70,7 @@ public DeploymentPlan getPlan() {
7070
DeploymentPlan plan = new DataCenterDeployment(
7171
dcId, podId, clusterId, hostId, poolId, physicalNetworkId,
7272
context);
73+
plan.setAvoids(avoids);
7374
return plan;
7475
}
7576

0 commit comments

Comments
 (0)