rg9975 commented on code in PR #7889:
URL: https://github.com/apache/cloudstack/pull/7889#discussion_r1352817396
##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java:
##########
@@ -400,15 +401,28 @@ private void handleCopyAsyncForVolumes(VolumeInfo
srcVolumeInfo, VolumeInfo dest
} else if (!isVolumeOnManagedStorage(destVolumeInfo)) {
handleVolumeMigrationFromManagedStorageToNonManagedStorage(srcVolumeInfo,
destVolumeInfo, callback);
} else {
+ if
(!HypervisorType.KVM.equals(srcVolumeInfo.getHypervisorType())) {
+ String errMsg = "Currently migrating volumes between
managed storage providers is only supported on KVM hypervisor";
+ handleError(errMsg, callback);
+ } else {
+ handleVolumeMigrationForKVM(srcVolumeInfo,
destVolumeInfo, callback);
+ }
+/**
String errMsg = "The source volume to migrate and the
destination volume are both on managed storage. " +
"Migration in this case is not yet supported.";
- handleError(errMsg, callback);
+ handleError(errMsg, callback);*/
Review Comment:
This should have been removed. handleError is called earlier in the if/else
logic in the appropriate place. Will be addressed in upcoming commit.
##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java:
##########
@@ -400,15 +401,28 @@ private void handleCopyAsyncForVolumes(VolumeInfo
srcVolumeInfo, VolumeInfo dest
} else if (!isVolumeOnManagedStorage(destVolumeInfo)) {
handleVolumeMigrationFromManagedStorageToNonManagedStorage(srcVolumeInfo,
destVolumeInfo, callback);
} else {
+ if
(!HypervisorType.KVM.equals(srcVolumeInfo.getHypervisorType())) {
+ String errMsg = "Currently migrating volumes between
managed storage providers is only supported on KVM hypervisor";
+ handleError(errMsg, callback);
+ } else {
+ handleVolumeMigrationForKVM(srcVolumeInfo,
destVolumeInfo, callback);
+ }
+/**
String errMsg = "The source volume to migrate and the
destination volume are both on managed storage. " +
"Migration in this case is not yet supported.";
- handleError(errMsg, callback);
+ handleError(errMsg, callback);*/
}
} else if (!isVolumeOnManagedStorage(destVolumeInfo)) {
- String errMsg = "The 'StorageSystemDataMotionStrategy' does
not support this migration use case.";
-
+ if
(!HypervisorType.KVM.equals(srcVolumeInfo.getHypervisorType())) {
+ String errMsg = "Currently migrating volumes between
managed storage providers is only supported on KVM hypervisor";
handleError(errMsg, callback);
+ } else {
+ handleVolumeMigrationForKVM(srcVolumeInfo, destVolumeInfo,
callback);
+ }
Review Comment:
handling in upcoming commit.
--
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]