JoaoJandre commented on code in PR #13914:
URL: https://github.com/apache/cloudstack/pull/13914#discussion_r4393456393
##########
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:
@Damans227 If I understood your comment correctly, it should be fixed now.
Now we get the result after removing the blockCommitListener, so it is
impossible for us to get a failed result and for the listener to process the
event after.
--
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]