sandeeplocharla commented on code in PR #13897:
URL: https://github.com/apache/cloudstack/pull/13897#discussion_r4338925325


##########
server/src/main/java/com/cloud/storage/StorageManagerImpl.java:
##########
@@ -1278,40 +1286,29 @@ public PrimaryDataStoreInfo 
updateStoragePool(UpdateStoragePoolCmd cmd) throws I
         if (capacityIops != null) {
             if (!capacityIops.equals(pool.getCapacityIops())) {
                 updatedCapacityIops = capacityIops;
+                 details.put(PrimaryDataStoreLifeCycle.CAPACITY_IOPS, 
String.valueOf(updatedCapacityIops));
                 changes = true;
             }
         }
 
-        // retrieve current details and merge/overlay input to capture changes
-        Map<String, String> details = null;
-        details = _storagePoolDetailsDao.listDetailsKeyPairs(id);
-        if (inputDetails != null) {
-            details.putAll(inputDetails);
-            changes = true;
-        }
-
         if (changes) {
-            StoragePoolVO storagePool = _storagePoolDao.findById(id);
-            DataStoreProvider dataStoreProvider = 
_dataStoreProviderMgr.getDataStoreProvider(storagePool.getStorageProviderName());
+            DataStoreProvider dataStoreProvider = 
_dataStoreProviderMgr.getDataStoreProvider(pool.getStorageProviderName());
             DataStoreLifeCycle dataStoreLifeCycle = 
dataStoreProvider.getDataStoreLifeCycle();
-
             if (dataStoreLifeCycle instanceof PrimaryDataStoreLifeCycle) {
+                if (cmd.getUrl() != null) {
+                   details.put("url", cmd.getUrl());
+                }
+                
((PrimaryDataStoreLifeCycle)dataStoreLifeCycle).updateStoragePool(pool, 
details);

Review Comment:
   Idea is to update the pool table with latest values post successful 
operation.



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