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



##########
File path: 
server/src/main/java/com/cloud/network/element/ConfigDriveNetworkElement.java
##########
@@ -639,7 +639,10 @@ private boolean deleteConfigDriveIso(final VirtualMachine 
vm) throws ResourceUna
 
         if (location == Location.SECONDARY) {
             dataStore = 
_dataStoreMgr.getImageStoreWithFreeCapacity(vm.getDataCenterId());
-            agentId = findAgentIdForImageStore(dataStore);
+            if 
(!VirtualMachineManager.VmConfigDriveOnPrimaryPool.valueIn(vm.getDataCenterId())
 &&
+                    
!VirtualMachineManager.VmConfigDriveForceHostCacheUse.valueIn(vm.getDataCenterId())
 && dataStore != null) {
+                agentId = findAgentIdForImageStore(dataStore);
+            }

Review comment:
       @Pearl1594 Any reason, why config drive deletion in secondary storage 
should depend on these settings _vm.configdrive.primarypool.enabled / 
vm.configdrive.use.host.cache.on.unsupported.pool_  (which are dynamic) ? 




-- 
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