cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cloudstack] shwstppr commented on a change in pull request #3480: [WIP DO NOT MERGE] engine, server, services: fix for respecting secondary storage threshold limit
Date Thu, 11 Jul 2019 05:48:16 GMT
shwstppr commented on a change in pull request #3480: [WIP DO NOT MERGE] engine, server, services:
fix for respecting secondary storage threshold limit
URL: https://github.com/apache/cloudstack/pull/3480#discussion_r302371263
 
 

 ##########
 File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
 ##########
 @@ -2677,6 +2677,9 @@ private String orchestrateExtractVolume(long volumeId, long zoneId)
{
         }
         // perform extraction
         ImageStoreEntity secStore = (ImageStoreEntity)dataStoreMgr.getImageStore(zoneId);
+        if (secStore == null) {
+            throw new InvalidParameterValueException(String.format("Secondary storage to
satisfy storage needs cannot be found for zone: %d", zoneId));
+        }
         String value = _configDao.getValue(Config.CopyVolumeWait.toString());
 
 Review comment:
   Not seeing any reference for getImageStore(Long zoneId) here,
   https://github.com/shapeblue/cloudstack/blob/secondary-storage-limit-3287/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java#L290-L388
   `DataStore getImageStore(String storeUuid, Long zoneId)` from `TemplateManager` used in
these methods already handles null value. https://github.com/shapeblue/cloudstack/blob/secondary-storage-limit-3287/server/src/main/java/com/cloud/template/TemplateManagerImpl.java#L428-L440

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message