Skip to content

Commit 22c6f08

Browse files
authored
engine-storage: Set SecretConsumerDetail for VM live migration with storage on shared NFS (#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 a6e9aec commit 22c6f08

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
@@ -2077,8 +2077,8 @@ public void copyAsync(Map<VolumeInfo, DataStore> volumeDataStoreMap, VirtualMach
20772077
migrateDiskInfo = configureMigrateDiskInfo(srcVolumeInfo, destPath, backingPath);
20782078
migrateDiskInfo.setSourceDiskOnStorageFileSystem(isStoragePoolTypeOfFile(sourceStoragePool));
20792079
migrateDiskInfoList.add(migrateDiskInfo);
2080-
prepareDiskWithSecretConsumerDetail(vmTO, srcVolumeInfo, destVolumeInfo.getPath());
20812080
}
2081+
prepareDiskWithSecretConsumerDetail(vmTO, srcVolumeInfo, destVolumeInfo.getPath());
20822082

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

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

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

0 commit comments

Comments
 (0)