Damans227 commented on code in PR #13914:
URL: https://github.com/apache/cloudstack/pull/13914#discussion_r4400999774


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java:
##########
@@ -6652,21 +6652,22 @@ protected void 
mergeSnapshotIntoBaseFileWithEventsAndConfigurableTimeout(Domain
         }
 
         BlockCommitListener blockCommitListener = 
getBlockCommitListener(vmName);
+        int remainingTimeout = 0;
+        String mergeResult = "Got an exception during block commit wait. Check 
earlier logs for more info.";
         try {
             vm.addBlockJobListener(blockCommitListener);
 
             logger.info("Starting block commit of QCOW2 delta [{}] of VM [{}]. 
Using parameters: diskLabel [{}]; baseFilePath [{}]; topFilePath [{}]; 
commitFlags [{}]",
-                    snapshotName,
-                    vmName, diskLabel, baseFilePath, topFilePath, commitFlags);
+                    snapshotName, vmName, diskLabel, baseFilePath, 
topFilePath, commitFlags);
 
             vm.blockCommit(diskLabel, baseFilePath, topFilePath, 0, 
commitFlags);
 
-            checkBlockCommitProgress(vm, diskLabel, vmName, snapshotName, 
topFilePath, baseFilePath);
+            remainingTimeout = checkBlockCommitProgress(vm, diskLabel, vmName, 
snapshotName, topFilePath, baseFilePath);
+            mergeResult = blockCommitListener.getResult(remainingTimeout);

Review Comment:
   @JoaoJandre this still reports a failed commit if the job ends on the very 
last poll, but thats rare and the safe side, so not blocking. fine to leave as 
is



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