abh1sar commented on issue #8255:
URL: https://github.com/apache/cloudstack/issues/8255#issuecomment-2160448541

   This happens when VM is live migrated along with migration of an encrypted 
data volume to a different pool. If the data volume is not moved to a different 
pool explicitly, the test case might pass.
   
   ```
   StorageSystemDataMotionStrategy.copyAsync()
   
                   if (isNonManagedNfsToNfsOrSharedMountPointToNfs) {
                       migrateDiskInfo = new 
MigrateCommand.MigrateDiskInfo(srcVolumeInfo.getPath(),
                               MigrateCommand.MigrateDiskInfo.DiskType.FILE,
                               MigrateCommand.MigrateDiskInfo.DriverType.QCOW2,
                               MigrateCommand.MigrateDiskInfo.Source.FILE,
                               connectHostToVolume(destHost, 
destVolumeInfo.getPoolId(), volumeIdentifier));
                   } else {
                       migrateDiskInfo = 
configureMigrateDiskInfo(srcVolumeInfo, destPath);
                       
migrateDiskInfo.setSourceDiskOnStorageFileSystem(isStoragePoolTypeOfFile(sourceStoragePool));
                       migrateDiskInfoList.add(migrateDiskInfo);
                       prepareDiskWithSecretConsumerDetail(vmTO, srcVolumeInfo, 
destVolumeInfo.getPath());
                   }
   ```
   `prepareDiskWithSecretConsumerDetail(vmTO, srcVolumeInfo, 
destVolumeInfo.getPath());` needs to be called for `NonManagedNfs..` also, 
otherwise the secret on the destination host will be configured with the source 
volume's path.
   
   The code, it seems like, is present since vol encryption was first 
introduced in 4.18.0


-- 
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]

Reply via email to