slavkap commented on code in PR #6552:
URL: https://github.com/apache/cloudstack/pull/6552#discussion_r922150938


##########
engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41700to41710.java:
##########
@@ -83,4 +96,25 @@ public void updateSystemVmTemplates(Connection conn) {
             throw new CloudRuntimeException("Failed to find / register 
SystemVM template(s)");
         }
     }
+
+    private void updateStorageType() {
+        storageDao = new PrimaryDataStoreDaoImpl();
+        List<StoragePoolVO> storPoolPools = 
storageDao.findPoolsByProvider("StorPool");
+        for (StoragePoolVO storagePoolVO : storPoolPools) {
+            if (StoragePoolType.SharedMountPoint == 
storagePoolVO.getPoolType()) {
+                storagePoolVO.setPoolType(StoragePoolType.StorPool);
+                storageDao.update(storagePoolVO.getId(), storagePoolVO);
+            }
+            updateStorPoolVolumesToStorPoolType(storagePoolVO.getId());

Review Comment:
   I don't think there will be cases with StorPool primary storage with a 
different storage type than the `SharedMountPoint`. But just in case, if there 
are any, I want to update all the volumes of the pool with the new storage type



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