Pearl1594 commented on code in PR #12617:
URL: https://github.com/apache/cloudstack/pull/12617#discussion_r3382794955
##########
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java:
##########
@@ -6441,6 +6507,32 @@ private Pair<Long, Long>
findClusterAndHostIdForVm(VirtualMachine vm) {
return findClusterAndHostIdForVm(vm, false);
}
+ private boolean hasClvmVolumes(long vmId) {
+ List<VolumeVO> volumes = _volsDao.findByInstance(vmId);
+ return volumes.stream()
+ .map(v -> _storagePoolDao.findById(v.getPoolId()))
+ .anyMatch(pool -> pool != null &&
ClvmPoolManager.isClvmPoolType(pool.getPoolType()));
+ }
+
+ private void executePreMigrationCommand(VirtualMachineTO to, String
vmInstanceName, long srcHostId) {
+ logger.info("Sending PreMigrationCommand to source host {} for VM {}
with CLVM volumes", srcHostId, vmInstanceName);
+ final PreMigrationCommand preMigCmd = new PreMigrationCommand(to,
vmInstanceName);
+ Answer preMigAnswer = null;
+ try {
+ preMigAnswer = _agentMgr.send(srcHostId, preMigCmd);
+ if (preMigAnswer == null || !preMigAnswer.getResult()) {
+ final String details = preMigAnswer != null ?
preMigAnswer.getDetails() : "null answer returned";
Review Comment:
next retry will proceed .
--
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]