From be04ff861c1cf66eebc2d244a825cb66fb03d765 Mon Sep 17 00:00:00 2001 From: prachi Date: Thu, 19 Jan 2012 12:03:38 -0800 Subject: [PATCH] Bug 13078 - Management Server does not respect selected OS Preference for any host within a single pod. Changes: - Once the HostAllocators have listed suitable hosts, planner should not reshuffle the list since that would lose the prioritization applied by the HostAllocators. - E.g: HostAllocators chooses that host first which matches the guest OS category. If planner shuffles the list, that preferrence is lost. --- server/src/com/cloud/deploy/FirstFitPlanner.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/server/src/com/cloud/deploy/FirstFitPlanner.java b/server/src/com/cloud/deploy/FirstFitPlanner.java index 14ac46d52e6..25f8d417bce 100755 --- a/server/src/com/cloud/deploy/FirstFitPlanner.java +++ b/server/src/com/cloud/deploy/FirstFitPlanner.java @@ -19,7 +19,6 @@ package com.cloud.deploy; import java.util.ArrayList; -import java.util.Collections; import java.util.Enumeration; import java.util.HashMap; import java.util.List; @@ -52,7 +51,6 @@ import com.cloud.host.Host; import com.cloud.host.HostVO; import com.cloud.host.Status; import com.cloud.host.dao.HostDao; -import com.cloud.host.dao.HostDetailsDao; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.offering.ServiceOffering; import com.cloud.org.Cluster; @@ -519,9 +517,6 @@ public class FirstFitPlanner extends PlannerBase implements DeploymentPlanner { return dest; } - if (_allocationAlgorithm != null && _allocationAlgorithm.equalsIgnoreCase("random")) { - Collections.shuffle(suitableHosts); - } Pair>, List> result = findSuitablePoolsForVolumes(vmProfile, potentialPlan, avoid, StoragePoolAllocator.RETURN_UPTO_ALL); Map> suitableVolumeStoragePools = result.first(); List readyAndReusedVolumes = result.second();