DaanHoogland commented on code in PR #13212:
URL: https://github.com/apache/cloudstack/pull/13212#discussion_r3287372535


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java:
##########
@@ -2092,23 +2092,24 @@ protected void rebaseSnapshot(SnapshotObjectTO 
snapshotObjectTO, KVMStoragePool
 
         logger.debug("Rebasing snapshot [{}] with parent [{}].", snapshotName, 
parentSnapshotPath);
 
+        int snapshotTimeoutInMillis = wait * 1000;
         try {
-            QemuImg qemuImg = new QemuImg(wait);
+            QemuImg qemuImg = new QemuImg(snapshotTimeoutInMillis);
             qemuImg.rebase(snapshotFile, parentSnapshotFile, 
PhysicalDiskFormat.QCOW2.toString(), false);
         } catch (LibvirtException | QemuImgException e) {
             if (!StringUtils.contains(e.getMessage(), "Is another process 
using the image")) {
                 logger.error("Exception while rebasing incremental snapshot 
[{}] due to: [{}].", snapshotName, e.getMessage(), e);
                 throw new CloudRuntimeException(e);
             }
-            retryRebase(snapshotName, wait, e, snapshotFile, 
parentSnapshotFile);
+            retryRebase(snapshotName, snapshotTimeoutInMillis, e, 
snapshotFile, parentSnapshotFile);
         }
     }
 
-    private void retryRebase(String snapshotName, int wait, Exception e, 
QemuImgFile snapshotFile, QemuImgFile parentSnapshotFile) {
+    private void retryRebase(String snapshotName, int waitInMilliseconds, 
Exception e, QemuImgFile snapshotFile, QemuImgFile parentSnapshotFile) {

Review Comment:
   should this always fit in an int? 



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