Skip to content

Commit be04ff8

Browse files
author
prachi
committed
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.
1 parent 89b9c51 commit be04ff8

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

server/src/com/cloud/deploy/FirstFitPlanner.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
package com.cloud.deploy;
2020

2121
import java.util.ArrayList;
22-
import java.util.Collections;
2322
import java.util.Enumeration;
2423
import java.util.HashMap;
2524
import java.util.List;
@@ -52,7 +51,6 @@
5251
import com.cloud.host.HostVO;
5352
import com.cloud.host.Status;
5453
import com.cloud.host.dao.HostDao;
55-
import com.cloud.host.dao.HostDetailsDao;
5654
import com.cloud.hypervisor.Hypervisor.HypervisorType;
5755
import com.cloud.offering.ServiceOffering;
5856
import com.cloud.org.Cluster;
@@ -519,9 +517,6 @@ private DeployDestination checkClustersforDestination(List<Long> clusterList, Vi
519517
return dest;
520518
}
521519

522-
if (_allocationAlgorithm != null && _allocationAlgorithm.equalsIgnoreCase("random")) {
523-
Collections.shuffle(suitableHosts);
524-
}
525520
Pair<Map<Volume, List<StoragePool>>, List<Volume>> result = findSuitablePoolsForVolumes(vmProfile, potentialPlan, avoid, StoragePoolAllocator.RETURN_UPTO_ALL);
526521
Map<Volume, List<StoragePool>> suitableVolumeStoragePools = result.first();
527522
List<Volume> readyAndReusedVolumes = result.second();

0 commit comments

Comments
 (0)