Copilot commented on code in PR #13748:
URL: https://github.com/apache/cloudstack/pull/13748#discussion_r3682450321


##########
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##########
@@ -2025,6 +2025,17 @@ private Pair<VolumeVO, DataStore> 
recreateVolume(VolumeVO vol, VirtualMachinePro
 
                 volume = volFactory.getVolume(newVol.getId(), destPool);
 
+                // CLVM: pin templateless volume creation to the deploy host
+                StoragePoolVO poolVO = 
_storagePoolDao.findById(destPool.getId());
+                if (poolVO != null && 
ClvmPoolManager.isClvmPoolType(poolVO.getPoolType())) {
+                    Long hostId = vm.getVirtualMachine().getHostId();
+                    if (hostId != null) {

Review Comment:
   This change introduces new CLVM-specific behavior in `recreateVolume` 
(templateId == null) but there is no unit test coverage for this code path. 
Since `engine/orchestration` already has `VolumeOrchestratorTest` and existing 
CLVM lock tests, adding a focused test would help prevent regressions (e.g., 
verify `setDestinationHostId` / `setClvmLockHostId` are set to the deploy 
destination host for CLVM pools).
   
   This issue also appears on line 2029 of the same file.



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