weizhouapache commented on code in PR #7594:
URL: https://github.com/apache/cloudstack/pull/7594#discussion_r1223932572


##########
server/src/main/java/com/cloud/resource/ResourceManagerImpl.java:
##########
@@ -979,6 +983,7 @@ public void doInTransactionWithoutResult(final 
TransactionStatus status) {
                     final Long poolId = pool.getPoolId();
                     final StoragePoolVO storagePool = 
_storagePoolDao.findById(poolId);
                     if (storagePool.isLocal() && isForceDeleteStorage) {
+                        destroyLocalStoragePoolVolumes(poolId);

Review Comment:
   this should be good :+1: 



##########
server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java:
##########
@@ -1635,6 +1645,17 @@ private void expungeVolumesInPrimaryOrSecondary(VolumeVO 
volume, DataStoreRole r
             }
         }
     }
+
+    private boolean canAccessVolumeStore(VolumeVO volume, DataStoreRole role) {
+        if (volume == null) {
+            throw new CloudRuntimeException("No volume given, cannot check 
access to volume store");
+        }
+        InternalIdentity pool = role == DataStoreRole.Primary ?
+                _storagePoolDao.findById(volume.getPoolId()) :
+                imageStoreDao.findById(volume.getPoolId());

Review Comment:
   use switch/case ?



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to