[PATCH] Revert "qemu: Do not require hostuuid in migration cookie"

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

 



This reverts commit 8d75e47edefdd77b86df1ee9af3cd5001d456f73.

Libvirt was never released with support for migration cookies without
hostuuid.
---
 src/qemu/qemu_migration.c | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index c15a75d..c4ac150 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -783,23 +783,22 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
     }
 
     if (!(tmp = virXPathString("string(./hostuuid[1])", ctxt))) {
-        VIR_WARN("Missing hostuuid element in migration data; cannot "
-                 "detect migration to the same host");
-    } else {
-        if (virUUIDParse(tmp, mig->remoteHostuuid) < 0) {
-            virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                           _("malformed hostuuid element in migration data"));
-            goto error;
-        }
-        if (memcmp(mig->remoteHostuuid, mig->localHostuuid,
-                   VIR_UUID_BUFLEN) == 0) {
-            virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Attempt to migrate guest to the same host %s"),
-                           tmp);
-            goto error;
-        }
-        VIR_FREE(tmp);
+        virReportError(VIR_ERR_INTERNAL_ERROR,
+                       "%s", _("missing hostuuid element in migration data"));
+        goto error;
     }
+    if (virUUIDParse(tmp, mig->remoteHostuuid) < 0) {
+        virReportError(VIR_ERR_INTERNAL_ERROR,
+                       "%s", _("malformed hostuuid element in migration data"));
+        goto error;
+    }
+    if (memcmp(mig->remoteHostuuid, mig->localHostuuid, VIR_UUID_BUFLEN) == 0) {
+        virReportError(VIR_ERR_INTERNAL_ERROR,
+                       _("Attempt to migrate guest to the same host %s"),
+                       tmp);
+        goto error;
+    }
+    VIR_FREE(tmp);
 
     /* Check to ensure all mandatory features from XML are also
      * present in 'flags' */
-- 
1.7.12.4

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