File xenstored-run-in-stubdomain.patch of Package xen.openSUSE_Leap_42.3_Update

References: fate#323663 - Run Xenstore in stubdomain

Index: xen-4.10.0-testing/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
===================================================================
--- xen-4.10.0-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
+++ xen-4.10.0-testing/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
@@ -16,7 +16,7 @@
 #
 # Changing this requires a reboot to take effect.
 #
-#XENSTORETYPE=daemon
+# XENSTORETYPE=daemon
 
 ## Type: string
 ## Default: xenstored
@@ -67,7 +67,7 @@ XENSTORED_ARGS=
 #
 # xenstore domain memory size in MiB.
 # Only evaluated if XENSTORETYPE is "domain".
-#XENSTORE_DOMAIN_SIZE=8
+#XENSTORE_DOMAIN_SIZE=32
 
 ## Type: string
 ## Default: not set, no autoballooning of xenstore domain
@@ -78,7 +78,7 @@ XENSTORED_ARGS=
 # - combination of both in form of <val>:<frac> (e.g. 8:1/100), resulting
 #   value will be the higher of both specifications
 # Only evaluated if XENSTORETYPE is "domain".
-#XENSTORE_MAX_DOMAIN_SIZE=
+#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=daemon
 
 /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
openSUSE Build Service is sponsored by