]> xenbits.xensource.com Git - libvirt.git/commitdiff
Revert "qemu: Do not require hostuuid in migration cookie"
authorJiri Denemark <jdenemar@redhat.com>
Fri, 26 Oct 2012 13:06:17 +0000 (15:06 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 29 Oct 2012 08:04:27 +0000 (09:04 +0100)
This reverts commit 8d75e47edefdd77b86df1ee9af3cd5001d456f73.

Libvirt was never released with support for migration cookies without
hostuuid.

src/qemu/qemu_migration.c

index a757e013b7b32d4ca72cc698e8d9633f61db3780..e0acc20d5dc9460ffed1c31eda0630f426d8a121 100644 (file)
@@ -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' */