Skip to content

Commit ea643a6

Browse files
server: cannot deploy/start vm if service offering has multiple tags (apache#5521)
1 parent dcc02e0 commit ea643a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/schema/src/main/java/com/cloud/host/dao/HostDaoImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
8585
+ "GROUP BY host_id "
8686
+ "HAVING tag_count = %s ";
8787
private static final String SEPARATOR = ",";
88-
private static final String LIST_CLUSTERID_FOR_HOST_TAG = "select distinct cluster_id from host join host_tags on host.id = host_tags.host_id and host_tags.tag = ?";
88+
private static final String LIST_CLUSTERID_FOR_HOST_TAG = "select distinct cluster_id from host join ( %s ) AS selected_hosts ON host.id = selected_hosts.host_id";
8989
private static final String GET_HOSTS_OF_ACTIVE_VMS = "select h.id " +
9090
"from vm_instance vm " +
9191
"join host h on (vm.host_id=h.id) " +

0 commit comments

Comments
 (0)