]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
conf: ABI: Check WWN in disk abi stability check
authorPeter Krempa <pkrempa@redhat.com>
Tue, 7 Apr 2015 14:00:16 +0000 (16:00 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 14 Apr 2015 06:44:36 +0000 (08:44 +0200)
Since the WWN influences guest behavior in naming disks we should treat
this as vm ABI.

src/conf/domain_conf.c

index ad30e94ed1954876ba2baace1164dd57366f27fa..8ccf7631758c085d9e2c3df4507da3be808ec3e1 100644 (file)
@@ -15889,6 +15889,14 @@ virDomainDiskDefCheckABIStability(virDomainDiskDefPtr src,
         return false;
     }
 
+    if (STRNEQ_NULLABLE(src->wwn, dst->wwn)) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("Target disk wwn '%s' does not match source '%s'"),
+                       NULLSTR(dst->wwn), NULLSTR(src->wwn));
+        return false;
+
+    }
+
     if (src->src->readonly != dst->src->readonly ||
         src->src->shared != dst->src->shared) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",