cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] anshul1886 commented on a change in pull request #2315: A comprehensive solution for #CLOUDSTACK-9025.
Date Thu, 01 Jan 1970 00:00:00 GMT
anshul1886 commented on a change in pull request #2315: A comprehensive solution for #CLOUDSTACK-9025.
URL: https://github.com/apache/cloudstack/pull/2315#discussion_r150755383
 
 

 ##########
 File path: engine/schema/src/com/cloud/host/dao/HostDaoImpl.java
 ##########
 @@ -1194,4 +1178,26 @@ public HostVO findByIp(final String ipAddress) {
         sc.setParameters("type", type);
         return listBy(sc);
     }
-}
+
+    String sqlFindHostConnectedToSnapshotStoragePoolToExecuteCommand = "select h.id from
snapshots s join volumes v on v.id = s.volume_id "
+            + "join storage_pool pool on pool.id = v.pool_id join cluster c on pool.cluster_id
= c.id join host h on h.cluster_id = c.id "
 
 Review comment:
   This method will not work in scenarios when volume or storage pool associated to snapshot
is deleted. Also there is no need to consider storage pool as only secondary storage is involved.
Any random hypervisor host in zone will do. Scenarios where storage pool is involved are already
handled in core code and don't go via command delegation route. Also don't use sql queries
instead write queries using Daos.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message