Skip to content

Commit e458a41

Browse files
Consider the clusters with allocation state 'Enabled' for EndPoint selection (in addition to Host state)
1 parent 0af887b commit e458a41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/storage/src/main/java/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public class DefaultEndPointSelector implements EndPointSelector {
8080
private final String findOneHostOnPrimaryStorage = "select t.id from "
8181
+ "(select h.id, cd.value, hd.value as " + VOL_ENCRYPT_COLUMN_NAME + " "
8282
+ "from host h join storage_pool_host_ref s on h.id = s.host_id "
83-
+ "join cluster c on c.id=h.cluster_id "
83+
+ "join cluster c on c.id=h.cluster_id and c.allocation_state = 'Enabled'"
8484
+ "left join cluster_details cd on c.id=cd.cluster_id and cd.name='" + CapacityManager.StorageOperationsExcludeCluster.key() + "' "
8585
+ "left join host_details hd on h.id=hd.host_id and hd.name='" + HOST_VOLUME_ENCRYPTION + "' "
8686
+ "where h.status = 'Up' and h.type = 'Routing' and h.resource_state = 'Enabled' and s.pool_id = ? ";

0 commit comments

Comments
 (0)