rhtyd commented on a change in pull request #2997: Allow KVM VM live migration
with ROOT volume on file storage type
URL: https://github.com/apache/cloudstack/pull/2997#discussion_r240976522
##########
File path:
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java
##########
@@ -251,29 +254,36 @@ private boolean canHandle(DataObject dataObject) {
}
@Override
- public StrategyPriority canHandle(Map<VolumeInfo, DataStore> volumeMap,
Host srcHost, Host destHost) {
+ public final StrategyPriority canHandle(Map<VolumeInfo, DataStore>
volumeMap, Host srcHost, Host destHost) {
if (HypervisorType.KVM.equals(srcHost.getHypervisorType())) {
- Set<VolumeInfo> volumeInfoSet = volumeMap.keySet();
+ return internalCanHandle(volumeMap);
+ }
+ return StrategyPriority.CANT_HANDLE;
+ }
+
+ /**
+ * Handles migrating volumes on managed Storage.
+ */
+ protected StrategyPriority internalCanHandle(Map<VolumeInfo, DataStore>
volumeMap) {
Review comment:
Great on refactoring
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services