Hello community,

here is the log from the commit of package libvirt for openSUSE:Leap:15.2 
checked in at 2020-06-10 16:49:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/libvirt (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.libvirt.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libvirt"

Wed Jun 10 16:49:47 2020 rev:116 rq:813018 version:6.0.0

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/libvirt/libvirt.changes        2020-04-30 
18:51:29.684605088 +0200
+++ /work/SRC/openSUSE:Leap:15.2/.libvirt.new.3606/libvirt.changes      
2020-06-10 16:49:47.816340328 +0200
@@ -1,0 +2,7 @@
+Wed Jun  3 16:38:09 UTC 2020 - James Fehlig <[email protected]>
+
+- libxl: Normalize MAC address in device conf on netdev hotplug
+  ec07aad8-libxl-normalize-mac-addr.patch
+  bsc#1172052
+
+-------------------------------------------------------------------

New:
----
  ec07aad8-libxl-normalize-mac-addr.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libvirt.spec ++++++
--- /var/tmp/diff_new_pack.AJ2tvH/_old  2020-06-10 16:49:48.608342626 +0200
+++ /var/tmp/diff_new_pack.AJ2tvH/_new  2020-06-10 16:49:48.612342637 +0200
@@ -360,6 +360,7 @@
 Patch19:        b523e225-xenconfig-passthrough.patch
 Patch20:        bed32525-tests-check-passthrough.patch
 Patch21:        9bf9e0ae-CVE-2020-12430.patch
+Patch22:        ec07aad8-libxl-normalize-mac-addr.patch
 # Patches pending upstream review
 Patch100:       libxl-dom-reset.patch
 Patch101:       network-don-t-use-dhcp-authoritative-on-static-netwo.patch
@@ -916,6 +917,7 @@
 %patch19 -p1
 %patch20 -p1
 %patch21 -p1
+%patch22 -p1
 %patch100 -p1
 %patch101 -p1
 %patch150 -p1

++++++ 0001-libxl-add-support-for-BlockResize-API.patch ++++++
--- /var/tmp/diff_new_pack.AJ2tvH/_old  2020-06-10 16:49:48.656342766 +0200
+++ /var/tmp/diff_new_pack.AJ2tvH/_new  2020-06-10 16:49:48.656342766 +0200
@@ -23,7 +23,7 @@
 ===================================================================
 --- libvirt-6.0.0.orig/src/libxl/libxl_driver.c
 +++ libvirt-6.0.0/src/libxl/libxl_driver.c
-@@ -5280,6 +5280,96 @@ libxlDomainMemoryStats(virDomainPtr dom,
+@@ -5316,6 +5316,96 @@ libxlDomainMemoryStats(virDomainPtr dom,
  
  #undef LIBXL_SET_MEMSTAT
  
@@ -120,7 +120,7 @@
  static int
  libxlDomainGetJobInfo(virDomainPtr dom,
                        virDomainJobInfoPtr info)
-@@ -6698,6 +6788,7 @@ static virHypervisorDriver libxlHypervis
+@@ -6734,6 +6824,7 @@ static virHypervisorDriver libxlHypervis
  #endif
      .nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */
      .nodeGetCellsFreeMemory = libxlNodeGetCellsFreeMemory, /* 1.1.1 */

++++++ ec07aad8-libxl-normalize-mac-addr.patch ++++++
commit ec07aad8f8a6ead8e9363c8deec4845edb5bf112
Author: Jim Fehlig <[email protected]>
Date:   Wed May 27 17:29:33 2020 -0600

    libxl: Normalize MAC address in device conf when hotplugging a netdev
    
    Similar to commits 55ce6564634 and 6c17606b7cc in the qemu driver, make
    separate copies of persistent and live device config and normalize the MAC
    address between the two. This avoids having different MAC address for the
    persistent and live config, ensuring the device has the same address when
    the persistent config takes affect after a VM restart.
    
    Signed-off-by: Jim Fehlig <[email protected]>
    Reviewed-by: Laine Stump <[email protected]>

Index: libvirt-6.0.0/src/libxl/libxl_driver.c
===================================================================
--- libvirt-6.0.0.orig/src/libxl/libxl_driver.c
+++ libvirt-6.0.0/src/libxl/libxl_driver.c
@@ -4089,6 +4089,31 @@ libxlDomainUpdateDeviceConfig(virDomainD
 }
 
 
+static void
+libxlDomainAttachDeviceNormalize(const virDomainDeviceDef *devConf,
+                                 virDomainDeviceDefPtr devLive)
+{
+    /*
+     * Fixup anything that needs to be identical in the live and
+     * config versions of DeviceDef, but might not be. Do this by
+     * changing the contents of devLive. This is done after all
+     * post-parse tweaks and validation, so be very careful about what
+     * changes are made.
+     */
+
+    /* MAC address should be identical in both DeviceDefs, but if it
+     * wasn't specified in the XML, and was instead autogenerated, it
+     * will be different for the two since they are each the result of
+     * a separate parser call. If it *was* specified, it will already
+     * be the same, so copying does no harm.
+     */
+
+    if (devConf->type == VIR_DOMAIN_DEVICE_NET)
+        virMacAddrSet(&devLive->data.net->mac, &devConf->data.net->mac);
+
+}
+
+
 static int
 libxlDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
                              unsigned int flags)
@@ -4097,7 +4122,9 @@ libxlDomainAttachDeviceFlags(virDomainPt
     libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
     virDomainObjPtr vm = NULL;
     virDomainDefPtr vmdef = NULL;
-    virDomainDeviceDefPtr dev = NULL;
+    virDomainDeviceDefPtr devConf = NULL;
+    virDomainDeviceDef devConfSave = { 0 };
+    virDomainDeviceDefPtr devLive = NULL;
     int ret = -1;
 
     virCheckFlags(VIR_DOMAIN_DEVICE_MODIFY_LIVE |
@@ -4116,28 +4143,36 @@ libxlDomainAttachDeviceFlags(virDomainPt
         goto endjob;
 
     if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) {
-        if (!(dev = virDomainDeviceDefParse(xml, vm->def,
-                                            driver->xmlopt, NULL,
-                                            VIR_DOMAIN_DEF_PARSE_INACTIVE)))
+        if (!(devConf = virDomainDeviceDefParse(xml, vm->def,
+                                                driver->xmlopt, NULL,
+                                                
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
             goto endjob;
 
         /* Make a copy for updated domain. */
         if (!(vmdef = virDomainObjCopyPersistentDef(vm, driver->xmlopt, NULL)))
             goto endjob;
 
-        if (libxlDomainAttachDeviceConfig(vmdef, dev) < 0)
+        /*
+         * devConf will be NULLed out by
+         * libxlDomainAttachDeviceConfig(), so save it for later use by
+         * libxlDomainAttachDeviceNormalize()
+         */
+        devConfSave = *devConf;
+
+        if (libxlDomainAttachDeviceConfig(vmdef, devConf) < 0)
             goto endjob;
     }
 
     if (flags & VIR_DOMAIN_DEVICE_MODIFY_LIVE) {
-        /* If dev exists it was created to modify the domain config. Free it. 
*/
-        virDomainDeviceDefFree(dev);
-        if (!(dev = virDomainDeviceDefParse(xml, vm->def,
+        if (!(devLive = virDomainDeviceDefParse(xml, vm->def,
                                             driver->xmlopt, NULL,
                                             VIR_DOMAIN_DEF_PARSE_INACTIVE)))
             goto endjob;
 
-        if (libxlDomainAttachDeviceLive(driver, vm, dev) < 0)
+        if (flags & VIR_DOMAIN_AFFECT_CONFIG)
+            libxlDomainAttachDeviceNormalize(&devConfSave, devLive);
+
+        if (libxlDomainAttachDeviceLive(driver, vm, devLive) < 0)
             goto endjob;
 
         /*
@@ -4164,7 +4199,8 @@ libxlDomainAttachDeviceFlags(virDomainPt
 
  cleanup:
     virDomainDefFree(vmdef);
-    virDomainDeviceDefFree(dev);
+    virDomainDeviceDefFree(devConf);
+    virDomainDeviceDefFree(devLive);
     virDomainObjEndAPI(&vm);
     virObjectUnref(cfg);
     return ret;

++++++ libxl-dom-reset.patch ++++++
--- /var/tmp/diff_new_pack.AJ2tvH/_old  2020-06-10 16:49:48.780343125 +0200
+++ /var/tmp/diff_new_pack.AJ2tvH/_new  2020-06-10 16:49:48.780343125 +0200
@@ -74,7 +74,7 @@
  libxlDomainDestroyFlags(virDomainPtr dom,
                          unsigned int flags)
  {
-@@ -6573,6 +6628,7 @@ static virHypervisorDriver libxlHypervis
+@@ -6609,6 +6664,7 @@ static virHypervisorDriver libxlHypervis
      .domainShutdown = libxlDomainShutdown, /* 0.9.0 */
      .domainShutdownFlags = libxlDomainShutdownFlags, /* 0.9.10 */
      .domainReboot = libxlDomainReboot, /* 0.9.0 */

++++++ libxl-set-migration-constraints.patch ++++++
--- /var/tmp/diff_new_pack.AJ2tvH/_old  2020-06-10 16:49:48.788343149 +0200
+++ /var/tmp/diff_new_pack.AJ2tvH/_new  2020-06-10 16:49:48.792343160 +0200
@@ -56,7 +56,7 @@
 ===================================================================
 --- libvirt-6.0.0.orig/src/libxl/libxl_driver.c
 +++ libvirt-6.0.0/src/libxl/libxl_driver.c
-@@ -6138,6 +6138,9 @@ libxlDomainMigratePerform3Params(virDoma
+@@ -6174,6 +6174,9 @@ libxlDomainMigratePerform3Params(virDoma
      const char *dname = NULL;
      const char *uri = NULL;
      int ret = -1;
@@ -66,7 +66,7 @@
  
  #ifdef LIBXL_HAVE_NO_SUSPEND_RESUME
      virReportUnsupportedError();
-@@ -6154,6 +6157,18 @@ libxlDomainMigratePerform3Params(virDoma
+@@ -6190,6 +6193,18 @@ libxlDomainMigratePerform3Params(virDoma
          virTypedParamsGetString(params, nparams,
                                  VIR_MIGRATE_PARAM_DEST_NAME,
                                  &dname) < 0 ||
@@ -85,7 +85,7 @@
          virTypedParamsGetString(params, nparams,
                                  VIR_MIGRATE_PARAM_URI,
                                  &uri) < 0)
-@@ -6168,11 +6183,11 @@ libxlDomainMigratePerform3Params(virDoma
+@@ -6204,11 +6219,11 @@ libxlDomainMigratePerform3Params(virDoma
  
      if ((flags & (VIR_MIGRATE_TUNNELLED | VIR_MIGRATE_PEER2PEER))) {
          if (libxlDomainMigrationSrcPerformP2P(driver, vm, dom->conn, dom_xml,


Reply via email to