rg9975 commented on code in PR #8889:
URL: https://github.com/apache/cloudstack/pull/8889#discussion_r1628628590
##########
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java:
##########
@@ -695,37 +695,21 @@ private void
handleVolumeMigrationFromNonManagedStorageToManagedStorage(VolumeIn
if (HypervisorType.XenServer.equals(hypervisorType)) {
handleVolumeMigrationForXenServer(srcVolumeInfo,
destVolumeInfo);
- }
- else {
+ destVolumeInfo =
_volumeDataFactory.getVolume(destVolumeInfo.getId(),
destVolumeInfo.getDataStore());
Review Comment:
For KVM, it is handled in the handleVolumeMigrationForKVM method but was not
for the handleVolumeMigrationForXenServer. Since it was handled in
handleVolumeMigrationForKVM, the finally block resulted in a double-callback
execution. This method is currently only implemented for Xen and KVM (per the
block at line 691). I'd love to refactor this more consistently (and really
move the provider-specific and hypervisor-specific logic to an implementation
layer) but time did not allow for 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]