rafaelweingartner commented on a change in pull request #2315: A comprehensive 
solution for #CLOUDSTACK-9025.
URL: https://github.com/apache/cloudstack/pull/2315#discussion_r150803272
 
 

 ##########
 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:
   I am using a DAO (Data access object), did you mean using a JPA queries 
(with ACS' home made JPA implementation)?
   
   But if volume is deleted, how can we find its snapshots? I mean, aren't the 
snapshots of a volume deleted as well?
   
   Are you sure that we use only the files in the secondary storage to build 
the template from a snapshot? I was under the impression that it was being used 
the primary storage as well.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to