[PATCH v7 11/13] qemu: Forbid blocks operations with quorum

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For now we block all blocks operations with RAID disks.

Quorum doesn't support BlockRebase neither, but
qemuDomainBlockRebase call qemuDomainBlockPullCommon or
qemuDomainBlockCopyCommon which are alerady blocked.

Signed-off-by: Matthias Gatto <matthias.gatto@xxxxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 4a56ebd..d0f7866 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14682,6 +14682,12 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
     if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
         goto cleanup;
 
+    if (virDomainDefHasRAID(vm->def)) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                       _("Snapshot does not support domain with RAID(like quorum) yet"));
+        goto cleanup;
+    }
+
     if (qemuProcessAutoDestroyActive(driver, vm)) {
         virReportError(VIR_ERR_OPERATION_INVALID,
                        "%s", _("domain is marked for auto destroy"));
@@ -16300,6 +16306,13 @@ qemuDomainBlockPullCommon(virQEMUDriverPtr driver,
         goto endjob;
     disk = vm->def->disks[idx];
 
+    if (virStorageSourceIsRAID(disk->src)) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("block pull is not yet supported with disk of format '%s'"),
+                       virStorageFileFormatTypeToString(disk->src->format));
+        goto endjob;
+    }
+
     if (qemuDomainDiskBlockJobIsActive(disk))
         goto endjob;
 
@@ -16411,6 +16424,13 @@ qemuDomainBlockJobAbort(virDomainPtr dom,
         goto endjob;
     disk = vm->def->disks[idx];
 
+    if (virStorageSourceIsRAID(disk->src)) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("block job is not yes supported with disk of format '%s'"),
+                       virStorageFileFormatTypeToString(disk->src->format));
+        goto endjob;
+    }
+
     if (disk->mirrorState != VIR_DOMAIN_DISK_MIRROR_STATE_NONE &&
         disk->mirrorState != VIR_DOMAIN_DISK_MIRROR_STATE_READY) {
         virReportError(VIR_ERR_OPERATION_INVALID,
@@ -16702,6 +16722,14 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm,
                        _("block copy is not supported with this QEMU binary"));
         goto endjob;
     }
+
+    if (virStorageSourceIsRAID(disk->src)) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("block copy is not yet supported with disk of format '%s'"),
+                       virStorageFileFormatTypeToString(disk->src->format));
+        goto endjob;
+    }
+
     if (vm->persistent) {
         /* XXX if qemu ever lets us start a new domain with mirroring
          * already active, we can relax this; but for now, the risk of
-- 
2.6.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]