You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/09/29 05:01:18 UTC

[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #5521: server: cannot deploy/start vm if service offering has multiple tags

sureshanaparti commented on a change in pull request #5521:
URL: https://github.com/apache/cloudstack/pull/5521#discussion_r718154216



##########
File path: engine/schema/src/main/java/com/cloud/host/dao/HostDaoImpl.java
##########
@@ -85,7 +85,7 @@
                                                              + "GROUP BY host_id "
                                                              + "HAVING tag_count = %s ";
     private static final String SEPARATOR = ",";
-    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 = ?";
+    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";

Review comment:
       @rhtyd It seems, all the tags are part of the sub-query stmt "_LIST_HOST_IDS_BY_COMPUTETAGS_" and the returned hosts from that sub-query were considered from further filtering.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org