This is an automated email from the ASF dual-hosted git repository.
winterhazel pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.20 by this push:
new a3970bb1530 Fix convert command's timeout for snapshot commands
(#13210)
a3970bb1530 is described below
commit a3970bb15301f421305f375d37ed5cd61db578b6
Author: Erik Böck <[email protected]>
AuthorDate: Mon Jun 1 10:29:33 2026 -0300
Fix convert command's timeout for snapshot commands (#13210)
---
.../java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java | 2 +-
.../kvm/src/main/java/org/apache/cloudstack/utils/qemu/QemuImg.java | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
index 52740cead27..070a03a23af 100644
---
a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
+++
b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
@@ -2061,7 +2061,7 @@ public class KVMStorageProcessor implements
StorageProcessor {
QemuImgFile destFile = new QemuImgFile(snapshotPath);
destFile.setFormat(PhysicalDiskFormat.QCOW2);
- QemuImg q = new QemuImg(wait);
+ QemuImg q = new QemuImg(wait * 1000L);
q.convert(srcFile, destFile, options, qemuObjects, qemuImageOpts,
null, true);
}
diff --git
a/plugins/hypervisors/kvm/src/main/java/org/apache/cloudstack/utils/qemu/QemuImg.java
b/plugins/hypervisors/kvm/src/main/java/org/apache/cloudstack/utils/qemu/QemuImg.java
index bc123b294ce..48423b7b60b 100644
---
a/plugins/hypervisors/kvm/src/main/java/org/apache/cloudstack/utils/qemu/QemuImg.java
+++
b/plugins/hypervisors/kvm/src/main/java/org/apache/cloudstack/utils/qemu/QemuImg.java
@@ -55,7 +55,7 @@ public class QemuImg {
/* The qemu-img binary. We expect this to be in $PATH */
public String _qemuImgPath = "qemu-img";
private String cloudQemuImgPath = "cloud-qemu-img";
- private int timeout;
+ private long timeout;
private boolean skipZero = false;
private boolean noCache = false;
private long version;
@@ -118,7 +118,7 @@ public class QemuImg {
* @param skipZeroIfSupported Don't write zeroes to target device during
convert, if supported by qemu-img
* @param noCache Ensure we flush writes to target disk (useful for block
device targets)
*/
- public QemuImg(final int timeout, final boolean skipZeroIfSupported, final
boolean noCache) throws LibvirtException {
+ public QemuImg(final long timeout, final boolean skipZeroIfSupported,
final boolean noCache) throws LibvirtException {
if (skipZeroIfSupported) {
final Script s = new Script(_qemuImgPath, timeout);
s.add("--help");
@@ -148,7 +148,7 @@ public class QemuImg {
* @param timeout
* The timeout of scripts executed by this QemuImg object.
*/
- public QemuImg(final int timeout) throws LibvirtException,
QemuImgException {
+ public QemuImg(final long timeout) throws LibvirtException,
QemuImgException {
this(timeout, false, false);
}