nvazquez commented on code in PR #13084:
URL: https://github.com/apache/cloudstack/pull/13084#discussion_r3615893267
##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java:
##########
@@ -2009,6 +2009,49 @@ protected void setVolumeMigrationOptions(VolumeInfo
srcVolumeInfo, VolumeInfo de
destVolumeInfo.setMigrationOptions(migrationOptions);
}
+ /**
+ * KVM/libvirt selects linked-clone or full-clone storage migration for
the whole VM migration request.
+ * If any disk is backed by a direct-download template, force the request
to full clone so libvirt does
+ * not use incremental shared-backing semantics for a disk whose backing
chain is not guaranteed on the destination.
+ */
+ protected boolean shouldForceFullCloneMigration(Map<VolumeInfo, DataStore>
volumeDataStoreMap, Host destHost) {
Review Comment:
Looks like this is unused? (besides the unit test)
##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java:
##########
@@ -2009,6 +2009,34 @@ protected void setVolumeMigrationOptions(VolumeInfo
srcVolumeInfo, VolumeInfo de
destVolumeInfo.setMigrationOptions(migrationOptions);
}
+ /**
+ * KVM/libvirt selects linked-clone or full-clone storage migration for
the whole VM migration request.
+ * If any disk is backed by a direct-download template, force the request
to full clone so libvirt does
+ * not use incremental shared-backing semantics for a disk whose backing
chain is not guaranteed on the destination.
+ */
+ protected boolean shouldForceFullCloneMigration(Map<VolumeInfo, DataStore>
volumeDataStoreMap, Host destHost) {
+ for (Map.Entry<VolumeInfo, DataStore> entry :
volumeDataStoreMap.entrySet()) {
+ VolumeInfo srcVolumeInfo = entry.getKey();
+ DataStore destDataStore = entry.getValue();
+ StoragePoolVO sourceStoragePool =
_storagePoolDao.findById(srcVolumeInfo.getPoolId());
+ StoragePoolVO destStoragePool =
_storagePoolDao.findById(destDataStore.getId());
+
Review Comment:
Good suggestion - @Kunalbehbud can you please check this?
--
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]