JoaoJandre commented on code in PR #13914:
URL: https://github.com/apache/cloudstack/pull/13914#discussion_r4404064761
##########
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 the job ends on the last poll, it should have been pivoted already by the
blockCommitListener, and we get the result after it has ended.
if the job ends after the last poll... there is nothing we can do, we have
to stop waiting eventually, and the job might end exactly after we stopped
waiting but that's just how it is. Can you give me an example of what you are
talking about?
--
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]