GabrielBrascher commented on a change in pull request #5410:
URL: https://github.com/apache/cloudstack/pull/5410#discussion_r721509160
##########
File path:
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/KvmNonManagedStorageDataMotionStrategy.java
##########
@@ -82,21 +82,19 @@
*/
@Override
protected StrategyPriority internalCanHandle(Map<VolumeInfo, DataStore>
volumeMap, Host srcHost, Host destHost) {
- if (super.internalCanHandle(volumeMap, srcHost, destHost) ==
StrategyPriority.CANT_HANDLE) {
- if (canHandleKVMNonManagedLiveNFSStorageMigration(volumeMap,
srcHost, destHost) == StrategyPriority.CANT_HANDLE) {
- Set<VolumeInfo> volumeInfoSet = volumeMap.keySet();
-
- for (VolumeInfo volumeInfo : volumeInfoSet) {
- StoragePoolVO storagePoolVO =
_storagePoolDao.findById(volumeInfo.getPoolId());
+ if (super.internalCanHandle(volumeMap, srcHost, destHost) !=
StrategyPriority.CANT_HANDLE
Review comment:
@GutoVeronezi the conditional logic has been inverted according to your
review.
- From
```
if (super.internalCanHandle == StrategyPriority.CANT_HANDLE) {
if (canHandleKVMNonManagedLiveNFSStorageMigration ==
StrategyPriority.CANT_HANDLE) {
...
}
}
return StrategyPriority.CANT_HANDLE;
```
OR
```
if (super.internalCanHandle == StrategyPriority.CANT_HANDLE)
&& (canHandleKVMNonManagedLiveNFSStorageMigration ==
StrategyPriority.CANT_HANDLE) {
...
}
return StrategyPriority.CANT_HANDLE;
```
- To
```
if (super.internalCanHandle != StrategyPriority.CANT_HANDLE
|| canHandleKVMNonManagedLiveNFSStorageMigration !=
StrategyPriority.CANT_HANDLE) {
return StrategyPriority.CANT_HANDLE;
}
return StrategyPriority.HYPERVISOR;
```
--
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]