You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/12/14 05:40:57 UTC

[GitHub] [cloudstack] Pearl1594 commented on a change in pull request #5750: use physical size instead of virtual size for migration.

Pearl1594 commented on a change in pull request #5750:
URL: https://github.com/apache/cloudstack/pull/5750#discussion_r768331931



##########
File path: engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/StorageOrchestrator.java
##########
@@ -194,8 +197,9 @@ public MigrationResponse migrateData(Long srcDataStoreId, List<Long> destDatasto
                 destDatastoreId = orderedDS.get(1);
             }
 
-            if (chosenFileForMigration.getSize() > storageCapacities.get(destDatastoreId).first()) {
-                s_logger.debug("file: " + chosenFileForMigration.getId() + " too large to be migrated to " + destDatastoreId);
+            if (chosenFileForMigration.getPhysicalSize() > storageCapacities.get(destDatastoreId).first()) {
+                s_logger.debug(String.format("%s: %s too large to be migrated to %s", getObjectType(chosenFileForMigration), chosenFileForMigration.getUuid(), destDatastoreId));
+                skipped += 1;
                 continue;

Review comment:
       You are right @sureshanaparti cc @DaanHoogland, we have a utility method getFileSize(), that gets the cumulative size. Since we are on that topic, I do have a doubt now, currently only snapshot chains are migrated together, is there any constraint on templates too, i.e., do multi-disk templates also need to go to the same store? 




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org