Skip to content

Commit 214fe2d

Browse files
abh1sardhslove
authored andcommitted
engine-storage: Set SecretConsumerDetail for VM live migration with storage on shared NFS (apache#9222)
* engine-storage-datamotion: Set SecretConsumerDetail for VM live migration with storage on shared NFS * VM live migration - powerflex encrypted volume * rename isPowerFlex
1 parent 217e7db commit 214fe2d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,8 +2078,8 @@ public void copyAsync(Map<VolumeInfo, DataStore> volumeDataStoreMap, VirtualMach
20782078
migrateDiskInfo = configureMigrateDiskInfo(srcVolumeInfo, destPath, backingPath);
20792079
migrateDiskInfo.setSourceDiskOnStorageFileSystem(isStoragePoolTypeOfFile(sourceStoragePool));
20802080
migrateDiskInfoList.add(migrateDiskInfo);
2081-
prepareDiskWithSecretConsumerDetail(vmTO, srcVolumeInfo, destVolumeInfo.getPath());
20822081
}
2082+
prepareDiskWithSecretConsumerDetail(vmTO, srcVolumeInfo, destVolumeInfo.getPath());
20832083

20842084
migrateStorage.put(srcVolumeInfo.getPath(), migrateDiskInfo);
20852085

@@ -2479,7 +2479,8 @@ protected void verifyLiveMigrationForKVM(Map<VolumeInfo, DataStore> volumeDataSt
24792479
throw new CloudRuntimeException("Destination storage pool with ID " + dataStore.getId() + " was not located.");
24802480
}
24812481

2482-
if (srcStoragePoolVO.isManaged() && srcStoragePoolVO.getId() != destStoragePoolVO.getId()) {
2482+
boolean isSrcAndDestPoolPowerFlexStorage = srcStoragePoolVO.getPoolType().equals(Storage.StoragePoolType.PowerFlex) && destStoragePoolVO.getPoolType().equals(Storage.StoragePoolType.PowerFlex);
2483+
if (srcStoragePoolVO.isManaged() && !isSrcAndDestPoolPowerFlexStorage && srcStoragePoolVO.getId() != destStoragePoolVO.getId()) {
24832484
throw new CloudRuntimeException("Migrating a volume online with KVM from managed storage is not currently supported.");
24842485
}
24852486

0 commit comments

Comments
 (0)