From b6d693f8e51929d460f9ecc358fc37cd575abc07257eadcebcc4e4c7fe6dc512 Mon Sep 17 00:00:00 2001 From: nick wang Date: Mon, 16 Oct 2017 09:53:20 +0000 Subject: [PATCH] Accepting request 534177 from home:wanghaisu:branches:network:ha-clustering:Factory bsc#1061147 and bsc#1061145 OBS-URL: https://build.opensuse.org/request/show/534177 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd-utils?expand=0&rev=49 --- drbd-utils.changes | 8 +++++ drbd-utils.spec | 7 +++- ..._fencing_from_disk_to_net_in_example.patch | 25 +++++++++++++ skip_sh-b-pri_in_v9.patch | 36 +++++++++++++++++++ 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 move_fencing_from_disk_to_net_in_example.patch create mode 100644 skip_sh-b-pri_in_v9.patch diff --git a/drbd-utils.changes b/drbd-utils.changes index 38ebf04..54e05fc 100644 --- a/drbd-utils.changes +++ b/drbd-utils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Oct 16 09:38:35 UTC 2017 - nwang@suse.com + +- bsc#1061145, fencing is moved from disk secion to net + Add move_fencing_from_disk_to_net_in_example.patch +- bsc#1061147, skip running drbdadm sh-b-pri in drbd9 + Add skip_sh-b-pri_in_v9.patch + ------------------------------------------------------------------- Fri Aug 25 06:45:36 UTC 2017 - nwang@suse.com diff --git a/drbd-utils.spec b/drbd-utils.spec index 2e32da4..6a50086 100644 --- a/drbd-utils.spec +++ b/drbd-utils.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %bcond_without drbdmon Name: drbd-utils @@ -35,6 +36,8 @@ Patch4: fix-segfault-up-stacked-resource.patch 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 +Patch8: move_fencing_from_disk_to_net_in_example.patch +Patch9: skip_sh-b-pri_in_v9.patch Provides: drbd-bash-completion = %{version} Provides: drbd-pacemaker = %{version} @@ -64,7 +67,7 @@ BuildRequires: pkgconfig BuildRequires: systemd BuildRequires: udev %if %{with drbdmon} -BuildRequires: gcc-c++ +BuildRequires: gcc-c++ %endif Provides: drbd-control Provides: drbdsetup @@ -84,6 +87,8 @@ raid 1. It is a building block for setting up clusters. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 +%patch9 -p1 %build ./autogen.sh diff --git a/move_fencing_from_disk_to_net_in_example.patch b/move_fencing_from_disk_to_net_in_example.patch new file mode 100644 index 0000000..30e6727 --- /dev/null +++ b/move_fencing_from_disk_to_net_in_example.patch @@ -0,0 +1,25 @@ +diff -Naur drbd-utils-9.0.0.orig/scripts/global_common.conf drbd-utils-9.0.0/scripts/global_common.conf +--- drbd-utils-9.0.0.orig/scripts/global_common.conf 2017-10-16 17:02:55.715528259 +0800 ++++ drbd-utils-9.0.0/scripts/global_common.conf 2017-10-16 17:07:49.755636558 +0800 +@@ -47,10 +47,10 @@ + } + + disk { +- # size on-io-error fencing disk-barrier disk-flushes ++ # on-io-error disk-barrier disk-flushes + # disk-drain md-flushes resync-rate resync-after al-extents +- # c-plan-ahead c-delay-target c-fill-target c-max-rate +- # c-min-rate disk-timeout ++ # c-plan-ahead c-delay-target c-fill-target c-max-rate ++ # c-min-rate disk-timeout + } + + net { +@@ -60,6 +60,6 @@ + # after-sb-1pri after-sb-2pri always-asbp rr-conflict + # ping-timeout data-integrity-alg tcp-cork on-congestion + # congestion-fill congestion-extents csums-alg verify-alg +- # use-rle ++ # use-rle fencing + } + } diff --git a/skip_sh-b-pri_in_v9.patch b/skip_sh-b-pri_in_v9.patch new file mode 100644 index 0000000..29d9256 --- /dev/null +++ b/skip_sh-b-pri_in_v9.patch @@ -0,0 +1,36 @@ +diff -Naur drbd-utils-9.0.0.orig/scripts/drbd drbd-utils-9.0.0/scripts/drbd +--- drbd-utils-9.0.0.orig/scripts/drbd 2017-10-16 17:02:55.707528280 +0800 ++++ drbd-utils-9.0.0/scripts/drbd 2017-10-16 17:34:02.134427141 +0800 +@@ -55,6 +55,13 @@ + . /lib/lsb/init-functions + fi + ++local DRBD_VERSION DRBD_IS_V9=false ++DRBD_VERSION="$($DRBDADM --version 2>/dev/null | grep DRBD_KERNEL_VERSION_CODE | cut -d '=' -f 2)" ++if (( $DRBD_VERSION >= 0x090000 )) ++then ++ DRBD_IS_V9=true ++fi ++ + assure_module_is_loaded() + { + [ -e "$PROC_DRBD" ] && return +@@ -191,7 +198,8 @@ + # Become primary if configured + # Currently, this is necessary for drbd8 + # drbd9 supports automatic promote and removes the "sh-b-pri" command. +- $DRBDADM sh-b-pri all || true ++ # Do not run "$DRBDADM sh-b-pri all" in v8 ++ $DRBD_IS_V9 || $DRBDADM sh-b-pri all || true + log_end_msg 0 + + # Now handle stacked devices, if any +@@ -218,7 +226,7 @@ + done + done + $DRBDADM -S wait-con-int # User interruptible version of wait-connect all +- $DRBDADM -S sh-b-pri all || true ++ $DRBD_IS_V9 || $DRBDADM -S sh-b-pri all || true + log_end_msg 0 + fi + fi