Hello community,

here is the log from the commit of package xen for openSUSE:Factory checked in 
at 2017-12-12 21:17:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xen (Old)
 and      /work/SRC/openSUSE:Factory/.xen.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xen"

Tue Dec 12 21:17:02 2017 rev:238 rq:554618 version:4.10.0_06

Changes:
--------
--- /work/SRC/openSUSE:Factory/xen/xen.changes  2017-11-30 12:41:33.874266405 
+0100
+++ /work/SRC/openSUSE:Factory/.xen.new/xen.changes     2017-12-12 
21:17:10.459213262 +0100
@@ -1,0 +2,16 @@
+Tue Nov 28 10:14:56 UTC 2017 - [email protected]
+
+- Increase the value of LIBXL_DESTROY_TIMEOUT from 10 to 100 seconds
+  If many domUs shutdown in parallel the backends can not keep up
+  Add some debug output to track how long backend shutdown takes (bsc#1035442)
+  libxl.LIBXL_DESTROY_TIMEOUT.patch
+  libxl.LIBXL_DESTROY_TIMEOUT.debug.patch
+
+-------------------------------------------------------------------
+Tue Nov 28 10:06:03 UTC 2017 - [email protected]
+
+- Adjust xenstore-run-in-studomain.patch to change the defaults
+  in the code instead of changing the sysconfig template, to also
+  cover the upgrade case
+
+-------------------------------------------------------------------

New:
----
  libxl.LIBXL_DESTROY_TIMEOUT.debug.patch
  libxl.LIBXL_DESTROY_TIMEOUT.patch

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

Other differences:
------------------
++++++ xen.spec ++++++
--- /var/tmp/diff_new_pack.DGCHtT/_old  2017-12-12 21:17:12.255126565 +0100
+++ /var/tmp/diff_new_pack.DGCHtT/_new  2017-12-12 21:17:12.259126372 +0100
@@ -15,9 +15,9 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-
 # needssslcertforbuild
 
+
 #Compat macro for new _fillupdir macro introduced in Nov 2017
 %if ! %{defined _fillupdir}
   %define _fillupdir /var/adm/fillup-templates
@@ -131,7 +131,7 @@
 BuildRequires:  pesign-obs-integration
 %endif
 
-Version:        4.10.0_03
+Version:        4.10.0_06
 Release:        0
 Summary:        Xen Virtualization: Hypervisor (aka VMM aka Microkernel)
 License:        GPL-2.0
@@ -197,6 +197,8 @@
 Patch465:       xen.libxl.dmmd.patch
 Patch466:       libxl.set-migration-constraints-from-cmdline.patch
 Patch467:       xenstore-run-in-studomain.patch
+Patch468:       libxl.LIBXL_DESTROY_TIMEOUT.patch
+Patch469:       libxl.LIBXL_DESTROY_TIMEOUT.debug.patch
 # python3 conversion patches
 Patch500:       pygrub-python3-conversion.patch
 Patch501:       xenmon-python3-conversion.patch
@@ -384,6 +386,8 @@
 %patch465 -p1
 %patch466 -p1
 %patch467 -p1
+%patch468 -p1
+%patch469 -p1
 # python3 conversion patches
 %patch500 -p1
 %patch501 -p1
@@ -461,8 +465,8 @@
 %if %{with xen_stubdom}
 configure_flags=--enable-stubdom
 %else
-# pick the default during a fresh install
-sed -i~ '/^XENSTORETYPE=domain/d' 
tools/hotplug/Linux/init.d/sysconfig.xencommons.in
+# change the/our default to daemon due to lack of stubdom
+sed -i~ 's/ XENSTORETYPE=domain$/ XENSTORETYPE=daemon/' 
tools/hotplug/Linux/launch-xenstore.in
 configure_flags=--disable-stubdom
 %endif
 configure_flags="${configure_flags} --disable-qemu-traditional"

++++++ libxl.LIBXL_DESTROY_TIMEOUT.debug.patch ++++++
bsc#1035442
the default value of LIBXL_DESTROY_TIMEOUT is too low when many domUs shutdown 
in parallel
track how much time passes between triggering XenbusStateClosing and 
XenbusStateClosed
Index: xen-4.10.0-testing/tools/libxl/libxl_event.c
===================================================================
--- xen-4.10.0-testing.orig/tools/libxl/libxl_event.c
+++ xen-4.10.0-testing/tools/libxl/libxl_event.c
@@ -16,6 +16,7 @@
  */
 
 #include <poll.h>
+#include <time.h>
 
 #include "libxl_internal.h"
 
@@ -846,6 +847,22 @@ void libxl__ev_evtchn_cancel(libxl__gc *
     evtchn_check_fd_deregister(gc);
 }
 
+static void diff_timespec(const struct timespec *old, char *b, size_t s)
+{
+    struct timespec new, diff;
+
+    if (old->tv_sec == 0 || clock_gettime(CLOCK_MONOTONIC, &new))
+        new = *old;
+    if ((new.tv_nsec - old->tv_nsec) < 0) {
+        diff.tv_sec = new.tv_sec - old->tv_sec - 1;
+        diff.tv_nsec = new.tv_nsec - old->tv_nsec + 1000000000;
+    } else {
+        diff.tv_sec = new.tv_sec - old->tv_sec;
+        diff.tv_nsec = new.tv_nsec - old->tv_nsec;
+    }
+    snprintf(b, s, "bug#1035442: %ld.%09lds", (long)diff.tv_sec, diff.tv_nsec);
+}
+
 /*
  * waiting for device state
  */
@@ -855,27 +872,29 @@ static void devstate_callback(libxl__egc
 {
     EGC_GC;
     libxl__ev_devstate *ds = CONTAINER_OF(xsw, *ds, w);
+    char b[64];
+    diff_timespec(&ds->w.start, b, sizeof(b));
 
     if (rc) {
         if (rc == ERROR_TIMEDOUT)
-            LOG(DEBUG, "backend %s wanted state %d "" timed out", ds->w.path,
-                ds->wanted);
+            LOG(DEBUG, "backend %s wanted state %d "" timed out (%s)", 
ds->w.path,
+                ds->wanted, b);
         goto out;
     }
     if (!sstate) {
-        LOG(DEBUG, "backend %s wanted state %d"" but it was removed",
-            ds->w.path, ds->wanted);
+        LOG(DEBUG, "backend %s wanted state %d"" but it was removed (%s)",
+            ds->w.path, ds->wanted, b);
         rc = ERROR_INVAL;
         goto out;
     }
 
     int got = atoi(sstate);
     if (got == ds->wanted) {
-        LOG(DEBUG, "backend %s wanted state %d ok", ds->w.path, ds->wanted);
+        LOG(DEBUG, "backend %s wanted state %d ok (%s)", ds->w.path, 
ds->wanted, b);
         rc = 0;
     } else {
-        LOG(DEBUG, "backend %s wanted state %d"" still waiting state %d",
-            ds->w.path, ds->wanted, got);
+        LOG(DEBUG, "backend %s wanted state %d"" still waiting state %d (%s)",
+            ds->w.path, ds->wanted, got, b);
         return;
     }
 
@@ -901,6 +920,8 @@ int libxl__ev_devstate_wait(libxl__ao *a
     ds->w.path = state_path;
     ds->w.timeout_ms = milliseconds;
     ds->w.callback = devstate_callback;
+    rc = clock_gettime(CLOCK_MONOTONIC, &ds->w.start);
+    if (rc) goto out;
     rc = libxl__xswait_start(gc, &ds->w);
     if (rc) goto out;
 
Index: xen-4.10.0-testing/tools/libxl/libxl_internal.h
===================================================================
--- xen-4.10.0-testing.orig/tools/libxl/libxl_internal.h
+++ xen-4.10.0-testing/tools/libxl/libxl_internal.h
@@ -1303,6 +1303,7 @@ struct libxl__xswait_state {
     const char *what; /* for error msgs: noun phrase, what we're waiting for */
     const char *path;
     int timeout_ms; /* as for poll(2) */
+    struct timespec start;
     libxl__xswait_callback *callback;
     /* remaining fields are private to xswait */
     libxl__ev_time time_ev;
++++++ libxl.LIBXL_DESTROY_TIMEOUT.patch ++++++
bsc#1035442
the default value of LIBXL_DESTROY_TIMEOUT is too low when many domUs shutdown 
in parallel
pick an arbitrary higher value
Index: xen-4.10.0-testing/tools/libxl/libxl_internal.h
===================================================================
--- xen-4.10.0-testing.orig/tools/libxl/libxl_internal.h
+++ xen-4.10.0-testing/tools/libxl/libxl_internal.h
@@ -90,7 +90,7 @@
 #include "_libxl_types_internal_json.h"
 
 #define LIBXL_INIT_TIMEOUT 10
-#define LIBXL_DESTROY_TIMEOUT 10
+#define LIBXL_DESTROY_TIMEOUT 100
 #define LIBXL_HOTPLUG_TIMEOUT 40
 /* QEMU may be slow to load and start due to a bug in Linux where the I/O
  * subsystem sometime produce high latency under load. */
++++++ xenstore-run-in-studomain.patch ++++++
--- /var/tmp/diff_new_pack.DGCHtT/_old  2017-12-12 21:17:12.587110539 +0100
+++ /var/tmp/diff_new_pack.DGCHtT/_new  2017-12-12 21:17:12.587110539 +0100
@@ -9,7 +9,7 @@
  # Changing this requires a reboot to take effect.
  #
 -#XENSTORETYPE=daemon
-+XENSTORETYPE=domain
++#XENSTORETYPE=domain
  
  ## Type: string
  ## Default: xenstored
@@ -18,7 +18,7 @@
  # xenstore domain memory size in MiB.
  # Only evaluated if XENSTORETYPE is "domain".
 -#XENSTORE_DOMAIN_SIZE=8
-+XENSTORE_DOMAIN_SIZE=32
++#XENSTORE_DOMAIN_SIZE=32
  
  ## Type: string
  ## Default: not set, no autoballooning of xenstore domain
@@ -27,7 +27,33 @@
  #   value will be the higher of both specifications
  # Only evaluated if XENSTORETYPE is "domain".
 -#XENSTORE_MAX_DOMAIN_SIZE=
-+XENSTORE_MAX_DOMAIN_SIZE=1/100
++#XENSTORE_MAX_DOMAIN_SIZE=1/100
  
  ## Type: string
  ## Default: ""
+Index: xen-4.10.0-testing/tools/hotplug/Linux/launch-xenstore.in
+===================================================================
+--- xen-4.10.0-testing.orig/tools/hotplug/Linux/launch-xenstore.in
++++ xen-4.10.0-testing/tools/hotplug/Linux/launch-xenstore.in
+@@ -48,7 +48,7 @@ test_xenstore && exit 0
+ 
+ test -f @CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons && . 
@CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons
+ 
+-[ "$XENSTORETYPE" = "" ] && XENSTORETYPE=daemon
++[ "$XENSTORETYPE" = "" ] && XENSTORETYPE=domain
+ 
+ /bin/mkdir -p @XEN_RUN_DIR@
+ 
+@@ -72,9 +72,10 @@ test -f @CONFIG_DIR@/@CONFIG_LEAF_DIR@/x
+ [ "$XENSTORETYPE" = "domain" ] && {
+       [ -z "$XENSTORE_DOMAIN_KERNEL" ] && 
XENSTORE_DOMAIN_KERNEL=@LIBEXEC@/boot/xenstore-stubdom.gz
+       XENSTORE_DOMAIN_ARGS="$XENSTORE_DOMAIN_ARGS --kernel 
$XENSTORE_DOMAIN_KERNEL"
+-      [ -z "$XENSTORE_DOMAIN_SIZE" ] && XENSTORE_DOMAIN_SIZE=8
++      [ -z "$XENSTORE_DOMAIN_SIZE" ] && XENSTORE_DOMAIN_SIZE=32
+       XENSTORE_DOMAIN_ARGS="$XENSTORE_DOMAIN_ARGS --memory 
$XENSTORE_DOMAIN_SIZE"
+-      [ -z "$XENSTORE_MAX_DOMAIN_SIZE" ] || 
XENSTORE_DOMAIN_ARGS="$XENSTORE_DOMAIN_ARGS --maxmem $XENSTORE_MAX_DOMAIN_SIZE"
++      [ -z "$XENSTORE_MAX_DOMAIN_SIZE" ] && XENSTORE_MAX_DOMAIN_SIZE="1/100"
++      XENSTORE_DOMAIN_ARGS="$XENSTORE_DOMAIN_ARGS --maxmem 
$XENSTORE_MAX_DOMAIN_SIZE"
+ 
+       echo -n Starting $XENSTORE_DOMAIN_KERNEL...
+       ${LIBEXEC_BIN}/init-xenstore-domain $XENSTORE_DOMAIN_ARGS || exit 1


Reply via email to