GabrielBrascher 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_r231107609
##########
File path:
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java
##########
@@ -1991,9 +2034,16 @@ private void
verifyLiveMigrationMapForKVM(Map<VolumeInfo, DataStore> volumeDataS
throw new CloudRuntimeException("Destination storage pool with
ID " + dataStore.getId() + " was not located.");
}
- if (!destStoragePoolVO.isManaged()) {
- throw new CloudRuntimeException("Migrating a volume online
with KVM can currently only be done when moving to managed storage.");
- }
+
throwExeptionIfCannotLiveMigrateOnANonManagedStorage(destStoragePoolVO);
+ }
+ }
+
+ /**
+ * It throws a {@link CloudRuntimeException} if the destiny storage pool
is not a managed storage pool.
+ */
+ protected void
throwExeptionIfCannotLiveMigrateOnANonManagedStorage(StoragePoolVO
destStoragePoolVO) {
Review comment:
The plan was to extract it to a method so I could change in the NonManaged
to not throw an exception, but to be honest, I could just remove the exception
as if it is not a managed storage it should not execute it anyway.
----------------------------------------------------------------
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