weizhouapache commented on code in PR #11625:
URL: https://github.com/apache/cloudstack/pull/11625#discussion_r2348708855
##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java:
##########
@@ -448,7 +452,54 @@ protected Answer copyVolumeBetweenPools(DataObject
srcData, DataObject destData)
}
return answer;
}
+ }
+
+ private boolean canBypassSecondaryStorage(DataObject srcData, DataObject
destData) {
+ if (srcData instanceof VolumeInfo) {
+ if (((VolumeInfo)srcData).isDirectDownload()) {
+ return true;
+ }
+
+ if (destData instanceof VolumeInfo) {
+ Scope srcDataStoreScope = srcData.getDataStore().getScope();
+ Scope destDataStoreScope = destData.getDataStore().getScope();
+ logger.info("srcDataStoreScope: {}, srcData pool type: {};
destDataStoreScope: {}, destData pool type: {}",
+ srcDataStoreScope,
((VolumeInfo)srcData).getStoragePoolType(), destDataStoreScope,
((VolumeInfo)destData).getStoragePoolType());
+
+ if (srcDataStoreScope != null && destDataStoreScope != null &&
+
SUPPORTED_POOL_TYPES_TO_BYPASS_SECONDARY_STORE.contains(((VolumeInfo)srcData).getStoragePoolType())
&&
+
SUPPORTED_POOL_TYPES_TO_BYPASS_SECONDARY_STORE.contains(((VolumeInfo)destData).getStoragePoolType()))
{
+
+ if (srcDataStoreScope.isSameScope(destDataStoreScope)) {
+ return true;
+ }
+
+ if (srcDataStoreScope.getScopeType() == ScopeType.HOST) {
Review Comment:
exact to a method ?
##########
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##########
@@ -2312,7 +2313,7 @@ public void updateVolumeDiskChain(long volumeId, String
path, String chainInfo,
@Override
public DiskProfile importVolume(Type type, String name, DiskOffering
offering, Long sizeInBytes, Long minIops, Long maxIops,
Review Comment:
will `importVolume` and `updateImportedVolume` be used in the volume
migration ?
--
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]