Accepting request 457613 from home:wanghaisu:branches:network:ha-clustering:Factory

Upgrade to upstream 8.9.8

OBS-URL: https://build.opensuse.org/request/show/457613
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd-utils?expand=0&rev=31
This commit is contained in:
nick wang 2017-02-16 07:27:47 +00:00 committed by Git OBS Bridge
parent 63e0d5134b
commit 9b032d587c
8 changed files with 54 additions and 123 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:297b77c9b3f88de2e7dae459234f2753ea4fc2805282b2d276e35cf51e292913
size 788183

3
drbd-utils-8.9.8.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ac9e08a7188e47ca4cab46b9511ce8e839b67b3585471de7699ca1c1e481ef1b
size 763783

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Feb 14 07:36:34 UTC 2017 - nwang@suse.com
- bsc#1025585, update to v8.9.8
- Remove patch zeroout-discard-devices.patch
Remove patch service-mod.patch
-------------------------------------------------------------------
Tue Dec 6 08:06:00 UTC 2016 - nwang@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package drbd-utils
#
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,23 +17,21 @@
Name: drbd-utils
Version: 8.9.6
Version: 8.9.8
Release: 0
Summary: Distributed Replicated Block Device
License: GPL-2.0+
Group: Productivity/Clustering/HA
Url: http://www.drbd.org/
Source: http://oss.linbit.com/drbd/%{name}-%{version}.tar.gz
Source: http://www.drbd.org/download/drbd/utils/%{name}-%{version}.tar.gz
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1: init-script-fixes.diff
Patch2: fix-libdir-in-Makefile.patch
Patch3: zeroout-discard-devices.patch
Patch4: service-mod.patch
Patch5: fence-after-pacemaker-down.patch
Patch6: support-drbd9-ra.patch
Patch7: fix-segfault-up-stacked-resource.patch
Patch8: initialize-node-id-when-create-md.patch
Patch3: fence-after-pacemaker-down.patch
Patch4: support-drbd9-ra.patch
Patch5: fix-segfault-up-stacked-resource.patch
Patch6: initialize-node-id-when-create-md.patch
Provides: drbd-bash-completion = %{version}
Provides: drbd-pacemaker = %{version}
@ -82,8 +80,6 @@ raid 1. It is a building block for setting up clusters.
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%build
./autogen.sh

View File

@ -1,7 +1,6 @@
Index: drbd-utils-8.9.2rc2+git.faeb645/scripts/drbd
===================================================================
--- drbd-utils-8.9.2rc2+git.faeb645.orig/scripts/drbd
+++ drbd-utils-8.9.2rc2+git.faeb645/scripts/drbd
diff -Naur drbd-utils-8.9.9.orig/scripts/drbd drbd-utils-8.9.9/scripts/drbd
--- drbd-utils-8.9.9.orig/scripts/drbd 2016-10-24 17:37:12.893292307 +0800
+++ drbd-utils-8.9.9/scripts/drbd 2016-10-24 17:38:56.728938286 +0800
@@ -9,14 +9,14 @@
#
### BEGIN INIT INFO
@ -12,17 +11,16 @@ Index: drbd-utils-8.9.2rc2+git.faeb645/scripts/drbd
+# Required-Stop: $remote_fs $network $syslog
# Should-Start: sshd multipathd
# Should-Stop: sshd multipathd
-# Default-Start: 2 3 4 5
+# Default-Start: 2 3 5
# Default-Start:
# Default-Stop: 0 1 6
-# X-Start-Before: heartbeat corosync
-# X-Stop-After: heartbeat corosync
+# X-Start-Before: pacemaker corosync
+# X-Stop-After: pacemaker corosync
# X-Interactive: true
# Short-Description: Control drbd resources.
### END INIT INFO
@@ -173,7 +173,6 @@ case "$1" in
# Short-Description: Control DRBD resources.
# Description: Control all DRBD resources.
@@ -184,7 +184,6 @@
done
done
@ -30,7 +28,7 @@ Index: drbd-utils-8.9.2rc2+git.faeb645/scripts/drbd
run_hook start_before-wait
$DRBDADM wait-con-int # User interruptible version of wait-connect all
run_hook start
@@ -226,7 +225,6 @@ case "$1" in
@@ -256,7 +255,6 @@
fi
done
run_hook stop

View File

@ -1,13 +0,0 @@
Index: drbd-utils-8.9.2/scripts/Makefile.in
===================================================================
--- drbd-utils-8.9.2.orig/scripts/Makefile.in
+++ drbd-utils-8.9.2/scripts/Makefile.in
@@ -65,7 +65,7 @@ endif
# yes, debian apparently allows installing both types from the same package
ifneq ($(initscripttype),sysv) # "systemd" or "both"
install -d $(DESTDIR)$(systemdunitdir)
- install -m 755 drbd.service $(DESTDIR)$(systemdunitdir)/
+ install -m 644 drbd.service $(DESTDIR)$(systemdunitdir)/
install -d $(DESTDIR)/lib/drbd/
install -m 755 drbd $(DESTDIR)/lib/drbd/
install -d $(DESTDIR)$(tmpfilesdir)/

View File

@ -1,7 +1,7 @@
diff -Naur drbd-utils-8.9.6.orig/scripts/drbd.ocf drbd-utils-8.9.6/scripts/drbd.ocf
--- drbd-utils-8.9.6.orig/scripts/drbd.ocf 2016-08-03 11:01:39.334765566 +0800
+++ drbd-utils-8.9.6/scripts/drbd.ocf 2016-08-03 11:31:40.801931986 +0800
@@ -328,6 +328,23 @@
diff -Naur drbd-utils-8.9.9.orig/scripts/drbd.ocf drbd-utils-8.9.9/scripts/drbd.ocf
--- drbd-utils-8.9.9.orig/scripts/drbd.ocf 2016-10-26 10:55:38.214292469 +0800
+++ drbd-utils-8.9.9/scripts/drbd.ocf 2016-10-26 11:02:30.160887975 +0800
@@ -329,6 +329,23 @@
do_cmd ${HA_SBIN_DIR}/crm_master -l reboot -D
}
@ -25,7 +25,7 @@ diff -Naur drbd-utils-8.9.6.orig/scripts/drbd.ocf drbd-utils-8.9.6/scripts/drbd.
_sh_status_process() {
# _volume not present should not happen,
# but may help make this agent work even if it talks to drbd 8.3.
@@ -335,11 +352,36 @@
@@ -336,11 +353,36 @@
# not-yet-created volumes are reported as -1
(( _volume >= 0 )) || _volume=$[1 << 16]
DRBD_ROLE_LOCAL[$_volume]=${_role:-Unconfigured}
@ -65,7 +65,7 @@ diff -Naur drbd-utils-8.9.6.orig/scripts/drbd.ocf drbd-utils-8.9.6/scripts/drbd.
drbd_set_status_variables() {
# drbdsetup sh-status prints these values to stdout,
# and then prints _sh_status_process.
@@ -352,6 +394,15 @@
@@ -353,6 +395,15 @@
local _resynced_percent
local out
@ -81,7 +81,7 @@ diff -Naur drbd-utils-8.9.6.orig/scripts/drbd.ocf drbd-utils-8.9.6/scripts/drbd.
DRBD_ROLE_LOCAL=()
DRBD_ROLE_REMOTE=()
DRBD_CSTATE=()
@@ -369,16 +420,20 @@
@@ -370,16 +421,20 @@
# if there was no output at all, or a weird output
# make sure the status arrays won't be empty.
[[ ${#DRBD_ROLE_LOCAL[@]} != 0 ]] || DRBD_ROLE_LOCAL=(Unconfigured)
@ -98,16 +98,16 @@ diff -Naur drbd-utils-8.9.6.orig/scripts/drbd.ocf drbd-utils-8.9.6/scripts/drbd.
+ : == DEBUG == DRBD_ID == ${DRBD_ID[@]} ==
+ : == DEBUG == DRBD_VOLUME == ${DRBD_VOLUME[@]} ==
+ fi
: == DEBUG == DRBD_ROLE_LOCAL == ${DRBD_ROLE_LOCAL[@]} ==
- : == DEBUG == DRBD_ROLE_REMOTE == ${DRBD_ROLE_REMOTE[@]} ==
- : == DEBUG == DRBD_CSTATE == ${DRBD_CSTATE[@]} ==
: == DEBUG == DRBD_DSTATE_LOCAL == ${DRBD_DSTATE_LOCAL[@]} ==
+ : == DEBUG == DRBD_CSTATE == ${DRBD_CSTATE[@]} ==
+ : == DEBUG == DRBD_ROLE_REMOTE == ${DRBD_ROLE_REMOTE[@]} ==
: == DEBUG == DRBD_DSTATE_REMOTE == ${DRBD_DSTATE_REMOTE[@]} ==
: == DEBUG == DRBD_ROLE_LOCAL == "${DRBD_ROLE_LOCAL[@]}" ==
- : == DEBUG == DRBD_ROLE_REMOTE == "${DRBD_ROLE_REMOTE[@]}" ==
- : == DEBUG == DRBD_CSTATE == "${DRBD_CSTATE[@]}" ==
: == DEBUG == DRBD_DSTATE_LOCAL == "${DRBD_DSTATE_LOCAL[@]}" ==
+ : == DEBUG == DRBD_CSTATE == "${DRBD_CSTATE[@]}" ==
+ : == DEBUG == DRBD_ROLE_REMOTE == "${DRBD_ROLE_REMOTE[@]}" ==
: == DEBUG == DRBD_DSTATE_REMOTE == "${DRBD_DSTATE_REMOTE[@]}" ==
}
@@ -414,6 +469,9 @@
@@ -415,6 +470,9 @@
ocf_is_true $OCF_RESKEY_stop_outdates_secondary || return 1
local host stop_uname
@ -117,7 +117,7 @@ diff -Naur drbd-utils-8.9.6.orig/scripts/drbd.ocf drbd-utils-8.9.6/scripts/drbd.
# We ignore $OCF_RESKEY_CRM_meta_notify_promote_uname here
# because: if demote and promote for a _stacked_ resource
# (or a "floating" one, where DRBD sits on top of some SAN)
@@ -437,6 +495,29 @@
@@ -438,6 +496,29 @@
return 1
done
@ -147,7 +147,7 @@ diff -Naur drbd-utils-8.9.6.orig/scripts/drbd.ocf drbd-utils-8.9.6/scripts/drbd.
# e.g. post/promote of some other peer.
# Should not happen, fencing constraints should take care of that.
# But in case it does, scream out loud.
@@ -993,6 +1074,7 @@
@@ -1020,6 +1101,7 @@
DRBDADM="drbdadm"
DRBDSETUP="drbdsetup"
DRBD_HAS_MULTI_VOLUME=false
@ -155,19 +155,14 @@ diff -Naur drbd-utils-8.9.6.orig/scripts/drbd.ocf drbd-utils-8.9.6/scripts/drbd.
# these will _exit_ if they don't find the binaries
check_binary $DRBDADM
@@ -1015,18 +1097,28 @@
modinfo -F version drbd |
sed -ne 's/^\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\).*$/\1 \2 \3/p'))
fi
- if (( $DRBD_KERNEL_VERSION_CODE >= 0x080400 )); then
+ if (( $DRBD_KERNEL_VERSION_CODE >= 0x090000 )); then
+ DRBD_HAS_MULTI_VOLUME=true
+ DRBD_VERSION_9=true
+ elif (( $DRBD_KERNEL_VERSION_CODE >= 0x080400 )); then
@@ -1046,15 +1128,25 @@
DRBD_HAS_MULTI_VOLUME=true
- elif (( $DRBD_KERNEL_VERSION_CODE >= 0x090000 )) ; then
fi
if (( $DRBD_KERNEL_VERSION_CODE >= 0x090000 )) ; then
- ocf_log err "This resource agent does (still) only support DRBD version 8.x"
- exit $OCF_ERR_INSTALLED
+ DRBD_HAS_MULTI_VOLUME=true
+ DRBD_VERSION_9=true
fi
check_crm_feature_set
@ -189,7 +184,7 @@ diff -Naur drbd-utils-8.9.6.orig/scripts/drbd.ocf drbd-utils-8.9.6/scripts/drbd.
meta_expect master-max -le 2
# Rather than returning $OCF_ERR_CONFIGURED, we sometimes return
@@ -1080,7 +1172,12 @@
@@ -1108,7 +1200,12 @@
# DRBD_DEVICES will be a shell array!
# FIXME we should double check that we explicitly restrict the set of
# valid characters in device names...
@ -203,10 +198,10 @@ diff -Naur drbd-utils-8.9.6.orig/scripts/drbd.ocf drbd-utils-8.9.6/scripts/drbd.
# apparently a "stacked" resource. Remember for future DRBDADM calls.
DRBDADM="$DRBDADM -S"
elif DRBD_DEVICES=($($DRBDADM sh-dev $DRBD_RESOURCE 2>/dev/null)); then
diff -Naur drbd-utils-8.9.6.orig/user/v9/drbdsetup.c drbd-utils-8.9.6/user/v9/drbdsetup.c
--- drbd-utils-8.9.6.orig/user/v9/drbdsetup.c 2016-08-03 11:01:39.318765641 +0800
+++ drbd-utils-8.9.6/user/v9/drbdsetup.c 2016-08-03 11:13:34.582378058 +0800
@@ -251,6 +251,7 @@
diff -Naur drbd-utils-8.9.9.orig/user/v9/drbdsetup.c drbd-utils-8.9.9/user/v9/drbdsetup.c
--- drbd-utils-8.9.9.orig/user/v9/drbdsetup.c 2016-10-26 10:55:38.210292487 +0800
+++ drbd-utils-8.9.9/user/v9/drbdsetup.c 2016-10-26 10:58:09.041778235 +0800
@@ -255,6 +255,7 @@
static int show_cmd(struct drbd_cmd *cm, int argc, char **argv);
static int status_cmd(struct drbd_cmd *cm, int argc, char **argv);
static int role_cmd(struct drbd_cmd *cm, int argc, char **argv);
@ -214,7 +209,7 @@ diff -Naur drbd-utils-8.9.6.orig/user/v9/drbdsetup.c drbd-utils-8.9.6/user/v9/dr
static int cstate_cmd(struct drbd_cmd *cm, int argc, char **argv);
static int dstate_cmd(struct drbd_cmd *cm, int argc, char **argv);
static int check_resize_cmd(struct drbd_cmd *cm, int argc, char **argv);
@@ -478,6 +479,9 @@
@@ -483,6 +484,9 @@
{"role", CTX_RESOURCE, 0, NO_PAYLOAD, role_cmd,
.lockless = true,
.summary = "Show the current role of a resource." },
@ -224,7 +219,7 @@ diff -Naur drbd-utils-8.9.6.orig/user/v9/drbdsetup.c drbd-utils-8.9.6/user/v9/dr
{"cstate", CTX_PEER_NODE, 0, NO_PAYLOAD, cstate_cmd,
.lockless = true,
.summary = "Show the current state of a connection." },
@@ -2576,6 +2580,87 @@
@@ -2786,6 +2790,87 @@
return 0;
}

View File

@ -1,52 +0,0 @@
diff -Naur drbd-utils-8.9.5.orig/documentation/v84/drbdsetup.xml drbd-utils-8.9.5/documentation/v84/drbdsetup.xml
--- drbd-utils-8.9.5.orig/documentation/v84/drbdsetup.xml 2015-12-24 14:13:13.928784939 +0800
+++ drbd-utils-8.9.5/documentation/v84/drbdsetup.xml 2015-12-24 14:14:51.533778352 +0800
@@ -1889,6 +1889,24 @@
<para>Clears the sync bitmap in addition to generating a new current UUID.</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>--zeroout-devices</option></term>
+
+ <listitem>
+ <para>Start to zeroing out the device on both side in addition to generating
+ a new current UUID .</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--discard-devices</option></term>
+
+ <listitem>
+ <para>Start to allocate a thinly provided backing device on both side in
+ addition to generating a new current UUID .</para>
+ </listitem>
+ </varlistentry>
</variablelist></para>
<para>This can be used to skip the initial sync, if you want to start from scratch. This
diff -Naur drbd-utils-8.9.5.orig/user/v84/config_flags.c drbd-utils-8.9.5/user/v84/config_flags.c
--- drbd-utils-8.9.5.orig/user/v84/config_flags.c 2015-12-24 14:13:13.937784939 +0800
+++ drbd-utils-8.9.5/user/v84/config_flags.c 2015-12-24 14:15:44.450774781 +0800
@@ -1028,6 +1028,8 @@
NLA_POLICY(new_c_uuid_parms),
.fields = {
{ "clear-bitmap", FLAG(clear_bm) },
+ { "zeroout-devices", FLAG(zeroout_devices) },
+ { "discard-devices", FLAG(discard_devices) },
{ } },
};
diff -Naur drbd-utils-8.9.5.orig/user/v84/linux/drbd_genl.h drbd-utils-8.9.5/user/v84/linux/drbd_genl.h
--- drbd-utils-8.9.5.orig/user/v84/linux/drbd_genl.h 2015-12-24 14:13:13.940784938 +0800
+++ drbd-utils-8.9.5/user/v84/linux/drbd_genl.h 2015-12-24 14:16:30.426771679 +0800
@@ -239,6 +239,8 @@
GENL_struct(DRBD_NLA_NEW_C_UUID_PARMS, 10, new_c_uuid_parms,
__flg_field(1, DRBD_GENLA_F_MANDATORY, clear_bm)
+ __flg_field(2, 0, zeroout_devices)
+ __flg_field(3, 0, discard_devices)
)
GENL_struct(DRBD_NLA_TIMEOUT_PARMS, 11, timeout_parms,