Hello community,

here is the log from the commit of package drbd-utils for openSUSE:Factory 
checked in at 2017-08-13 14:59:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/drbd-utils (Old)
 and      /work/SRC/openSUSE:Factory/.drbd-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "drbd-utils"

Sun Aug 13 14:59:13 2017 rev:16 rq:516055 version:9.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/drbd-utils/drbd-utils.changes    2017-07-26 
13:05:10.499113079 +0200
+++ /work/SRC/openSUSE:Factory/.drbd-utils.new/drbd-utils.changes       
2017-08-13 14:59:15.232252863 +0200
@@ -1,0 +2,6 @@
+Fri Aug 11 06:09:20 UTC 2017 - [email protected]
+
+- bsc#1052352, support block drbd for legacy format.
+- Add Update-block-drbd-script-to-support-xen.patch 
+
+-------------------------------------------------------------------

New:
----
  Update-block-drbd-script-to-support-xen.patch

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

Other differences:
------------------
++++++ drbd-utils.spec ++++++
--- /var/tmp/diff_new_pack.SlvEys/_old  2017-08-13 14:59:16.316100754 +0200
+++ /var/tmp/diff_new_pack.SlvEys/_new  2017-08-13 14:59:16.340097386 +0200
@@ -33,6 +33,7 @@
 # PATCH-SUSE-FIX: Disable quorum in default configuration (bsc#1032142)
 Patch5:         0001-Disable-quorum-in-default-configuration-bsc-1032142.patch
 Patch6:         fix_call_khelper_with_stack.patch
+Patch7:         Update-block-drbd-script-to-support-xen.patch
 
 Provides:       drbd-bash-completion = %{version}
 Provides:       drbd-pacemaker = %{version}
@@ -78,6 +79,7 @@
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 
 %build
 ./autogen.sh

++++++ Update-block-drbd-script-to-support-xen.patch ++++++
The xm/xend toolstack has long been removed from Xen and replaced
with xl/libxl. The legacy xmdomain.cfg(5) configuration format is
still supported for backward compatibility, but xl.cfg(5) format
is preferred. Update the script documenation to reflect this.

When the legacy format is used, libxl places the entire target
string in $XENBUS_PATH/params, e.g. 'drbd:myresource'. To ensure
the script continues to work with the legacy configuration format,
strip any 'drbd:' prefix from the resource identifier read from
xenstore.

Signed-off-by: Jim Fehlig <[email protected]>
Signed-off-by: Nick Wang <[email protected]>

---
diff -Naur drbd-utils-9.0.0.orig/scripts/block-drbd 
drbd-utils-9.0.0/scripts/block-drbd
--- drbd-utils-9.0.0.orig/scripts/block-drbd    2017-08-11 14:04:56.456929623 
+0800
+++ drbd-utils-9.0.0/scripts/block-drbd 2017-08-11 14:06:50.625342048 +0800
@@ -5,12 +5,16 @@
 #
 # This script implements the "drbd" VBD type. To use a DRBD resource
 # as a virtual block device, include a line similar to this in your
-# domU configuration:
+# domain xl.cfg(5) configuration:
 #
-# disk = [ 'drbd:myresource,xvda1,w' ]
+# disk = [ "vdev=vda,access=rw,script=block-drbd,target=myresource" ]
+#
+# The legacy xmdomain.cfg(5) configuration format is also supported
+#
+# disk = [ 'drbd:myresource,xvda,w' ]
 #
 # This will direct Xen to put the DRBD resource named 'myresource'
-# into the Primary role, and configure it as device xvda1 in your
+# into the Primary role, and configure it as device xvda in your
 # domU. You may use as many DRBD resources as you like. If you are
 # using DRBD in dual-Primary mode (available in DRBD versions 8.0 and
 # up), your DRBD-backed domU will be live migration capable. 
@@ -34,7 +38,6 @@
 #   made available read-only to multiple domU's, or be mounted
 #   read-only in the dom0 and be made available read-only to
 #   domU's. This is not supported by the 'drbd' VBD type.
-# - Tested, thus far, only on Debian etch with Xen 3.0.3.
 #
 # For more information about DRBD, visit http://www.drbd.org/.
 #   
@@ -246,6 +249,7 @@
     if [ -n "$t" ]
     then
       p=$(xenstore_read "$XENBUS_PATH/params")
+      p=${p#drbd:}
       mode=$(xenstore_read "$XENBUS_PATH/mode")
     fi
 
@@ -280,7 +284,7 @@
     case $t in 
       drbd|phy)
         p=$(xenstore_read "$XENBUS_PATH/params")
-        drbd_resource=$p
+        drbd_resource=${p#drbd:}
         drbd_role="$(drbdadm role $drbd_resource)"
         drbd_lrole="${drbd_role%%/*}"
         drbd_dev="$(drbdadm sh-dev $drbd_resource)"

Reply via email to