de-fuzz resource-agents patches

Problem:
- Centos 7.5 upgraded resource-agentss.
- Porting of resource-agentss patches did not resolve and 'fuzz' in the line
  numbers of the patches.
- If resource-agents is built by rpm 4.11, or default version of rpm
  until 4.14 is compiled, a fuzzy patch results in the creating
  of an .orig file.
- Packaging of resource-agentss failes due to the unexpected, and
  unpackaged .orig file

Solution:
  Safest solution is to de-fuzz our resource-agentss patches.

Story: 2003389
Task: 26755

Change-Id: I14d975368f5e70eea5bae6ac8dcfed2cfd6711ff
Signed-off-by: Sun Austin <austin.sun@intel.com>
This commit is contained in:
Sun Austin 2018-09-27 17:33:18 +08:00
parent 5514b84469
commit c22442cf09
14 changed files with 72 additions and 68 deletions

View File

@ -1,4 +1,4 @@
From 231334d30e9ad3f32dc915f973c71ac18d9c8191 Mon Sep 17 00:00:00 2001
From 75bbb081b6cd87f7da59d597e1737f7b4ed395c7 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:11:59 -0400
Subject: [PATCH 05/10] WRS: Fix-VG-activity-bug-in-heartbeat-LVM-script.patch
@ -8,10 +8,10 @@ Subject: [PATCH 05/10] WRS: Fix-VG-activity-bug-in-heartbeat-LVM-script.patch
1 file changed, 2 insertions(+)
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
index 28b6e50..832d588 100644
index 3d8ece2..9fa7f86 100644
--- a/SPECS/resource-agents.spec
+++ b/SPECS/resource-agents.spec
@@ -247,6 +247,7 @@ Patch1111: pgsql.patch
@@ -274,6 +274,7 @@ Patch1111: pgsql.patch
Patch1113: create-var-run-resource-agents.patch
Patch1114: notify-rmon-of-shutdown-before-shutting-down.patch
@ -19,7 +19,7 @@ index 28b6e50..832d588 100644
Obsoletes: heartbeat-resources <= %{version}
Provides: heartbeat-resources = %{version}
@@ -551,6 +552,7 @@ exit 1
@@ -605,6 +606,7 @@ exit 1
%patch1113 -p1
%patch1114 -p1
@ -28,5 +28,5 @@ index 28b6e50..832d588 100644
%build
if [ ! -f configure ]; then
--
1.9.1
2.7.4

View File

@ -1,4 +1,4 @@
From 1c5dc7640e843a553df5663305a739fc0c7aa9e1 Mon Sep 17 00:00:00 2001
From 87673fd8f797034a206ac4e54ac85d258daece13 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:11:59 -0400
Subject: [PATCH 09/10] WRS: ipaddr2-if-down.patch
@ -8,10 +8,10 @@ Subject: [PATCH 09/10] WRS: ipaddr2-if-down.patch
1 file changed, 2 insertions(+)
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
index 28a8129..71d6cc4 100644
index fd8bc97..bbf2754 100644
--- a/SPECS/resource-agents.spec
+++ b/SPECS/resource-agents.spec
@@ -250,6 +250,7 @@ Patch1114: notify-rmon-of-shutdown-before-shutting-down.patch
@@ -277,6 +277,7 @@ Patch1114: notify-rmon-of-shutdown-before-shutting-down.patch
Patch1115: Fix-VG-activity-bug-in-heartbeat-LVM-script.patch
Patch1116: ocf-shellfuncs_change_logtag.patch
Patch1117: lvm_cleanup_refs_on_stop.patch
@ -19,7 +19,7 @@ index 28a8129..71d6cc4 100644
Obsoletes: heartbeat-resources <= %{version}
Provides: heartbeat-resources = %{version}
@@ -557,6 +558,7 @@ exit 1
@@ -611,6 +612,7 @@ exit 1
%patch1115 -p1
%patch1116 -p1
%patch1117 -p1
@ -28,5 +28,5 @@ index 28a8129..71d6cc4 100644
%build
if [ ! -f configure ]; then
--
1.9.1
2.7.4

View File

@ -1,4 +1,4 @@
From bc7c08fdf1a415af73757a4fc86e5c35fe9ab3f8 Mon Sep 17 00:00:00 2001
From 774432f5665f102f7de7b35be0cb753964c4905c Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:11:59 -0400
Subject: [PATCH 03/10] WRS: spec-add-create-var-run-resource-agents.patch
@ -8,10 +8,10 @@ Subject: [PATCH 03/10] WRS: spec-add-create-var-run-resource-agents.patch
1 file changed, 2 insertions(+)
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
index 52c3c93..ba7af5b 100644
index 7d53666..0725e97 100644
--- a/SPECS/resource-agents.spec
+++ b/SPECS/resource-agents.spec
@@ -245,6 +245,7 @@ Patch1109: umount-in-namespace.patch
@@ -272,6 +272,7 @@ Patch1109: umount-in-namespace.patch
Patch1110: lvm_vg_activation.patch
Patch1111: pgsql.patch
@ -19,7 +19,7 @@ index 52c3c93..ba7af5b 100644
Obsoletes: heartbeat-resources <= %{version}
Provides: heartbeat-resources = %{version}
@@ -547,6 +548,7 @@ exit 1
@@ -601,6 +602,7 @@ exit 1
%patch1110 -p1
%patch1111 -p1
@ -28,5 +28,5 @@ index 52c3c93..ba7af5b 100644
%build
if [ ! -f configure ]; then
--
1.9.1
2.7.4

View File

@ -1,4 +1,4 @@
From 389034e186f6dfabdfa4bb75671a3f21d448bcbb Mon Sep 17 00:00:00 2001
From 0af59dc6da82061d551c452fac36fa9c93c313f2 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:11:59 -0400
Subject: [PATCH 10/10] WRS: spec-add-ipaddr2-ignore-lo-state.patch
@ -8,10 +8,10 @@ Subject: [PATCH 10/10] WRS: spec-add-ipaddr2-ignore-lo-state.patch
1 file changed, 2 insertions(+)
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
index 71d6cc4..460fc8f 100644
index bbf2754..0a25ab0 100644
--- a/SPECS/resource-agents.spec
+++ b/SPECS/resource-agents.spec
@@ -251,6 +251,7 @@ Patch1115: Fix-VG-activity-bug-in-heartbeat-LVM-script.patch
@@ -278,6 +278,7 @@ Patch1115: Fix-VG-activity-bug-in-heartbeat-LVM-script.patch
Patch1116: ocf-shellfuncs_change_logtag.patch
Patch1117: lvm_cleanup_refs_on_stop.patch
Patch1118: ipaddr2_if_down.patch
@ -19,7 +19,7 @@ index 71d6cc4..460fc8f 100644
Obsoletes: heartbeat-resources <= %{version}
Provides: heartbeat-resources = %{version}
@@ -559,6 +560,7 @@ exit 1
@@ -613,6 +614,7 @@ exit 1
%patch1116 -p1
%patch1117 -p1
%patch1118 -p1
@ -28,5 +28,5 @@ index 71d6cc4..460fc8f 100644
%build
if [ ! -f configure ]; then
--
1.9.1
2.7.4

View File

@ -1,4 +1,4 @@
From 72fdb47d6d79b950fc900c88d77605911cdcb4b1 Mon Sep 17 00:00:00 2001
From 8c725e6e7a4931066488a74227f902269850a263 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:11:58 -0400
Subject: [PATCH 02/10] WRS: spec-avoid-dir-collisions.patch
@ -8,10 +8,10 @@ Subject: [PATCH 02/10] WRS: spec-avoid-dir-collisions.patch
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
index 453398a..52c3c93 100644
index 6c1ec89..7d53666 100644
--- a/SPECS/resource-agents.spec
+++ b/SPECS/resource-agents.spec
@@ -642,14 +642,15 @@ rm -rf %{buildroot}
@@ -704,14 +704,15 @@ rm -rf %{buildroot}
%endif
%if %{with linuxha}
@ -33,7 +33,7 @@ index 453398a..52c3c93 100644
%if %{with rgmanager}
/usr/lib/ocf/resource.d/redhat
%endif
@@ -669,7 +670,7 @@ rm -rf %{buildroot}
@@ -734,7 +735,7 @@ rm -rf %{buildroot}
%{_includedir}/heartbeat
@ -42,7 +42,7 @@ index 453398a..52c3c93 100644
%{_mandir}/man7/*.7*
@@ -780,7 +781,7 @@ rm -rf %{buildroot}
@@ -845,7 +846,7 @@ rm -rf %{buildroot}
%exclude %{_mandir}/man8/ldirectord.8.gz
# For compatability with pre-existing agents
@ -52,5 +52,5 @@ index 453398a..52c3c93 100644
%{_libexecdir}/heartbeat
--
1.9.1
2.7.4

View File

@ -1,4 +1,4 @@
From 80e779cf7c6f667ccca0d91c13229520649e2920 Mon Sep 17 00:00:00 2001
From bb2ed3ed905824f2d8fb02bfbd7bc271843361a5 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:11:59 -0400
Subject: [PATCH 06/10] WRS: spec-include-tis-logtag-patch.patch
@ -8,10 +8,10 @@ Subject: [PATCH 06/10] WRS: spec-include-tis-logtag-patch.patch
1 file changed, 2 insertions(+)
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
index 832d588..e3a7ce1 100644
index 9fa7f86..c325197 100644
--- a/SPECS/resource-agents.spec
+++ b/SPECS/resource-agents.spec
@@ -248,6 +248,7 @@ Patch1111: pgsql.patch
@@ -275,6 +275,7 @@ Patch1111: pgsql.patch
Patch1113: create-var-run-resource-agents.patch
Patch1114: notify-rmon-of-shutdown-before-shutting-down.patch
Patch1115: Fix-VG-activity-bug-in-heartbeat-LVM-script.patch
@ -19,7 +19,7 @@ index 832d588..e3a7ce1 100644
Obsoletes: heartbeat-resources <= %{version}
Provides: heartbeat-resources = %{version}
@@ -553,6 +554,7 @@ exit 1
@@ -607,6 +608,7 @@ exit 1
%patch1113 -p1
%patch1114 -p1
%patch1115 -p1
@ -28,5 +28,5 @@ index 832d588..e3a7ce1 100644
%build
if [ ! -f configure ]; then
--
1.9.1
2.7.4

View File

@ -1,4 +1,4 @@
From 273da7710af8e7fbaf39eb1d31872089b77f0b0b Mon Sep 17 00:00:00 2001
From d8db42cf6aac88403c9f9101230061864a96eec0 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:11:59 -0400
Subject: [PATCH 07/10] WRS: spec-lvm-cleanup-refs-on-stop.patch
@ -8,10 +8,10 @@ Subject: [PATCH 07/10] WRS: spec-lvm-cleanup-refs-on-stop.patch
1 file changed, 2 insertions(+)
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
index e3a7ce1..6be3418 100644
index c325197..21fa049 100644
--- a/SPECS/resource-agents.spec
+++ b/SPECS/resource-agents.spec
@@ -249,6 +249,7 @@ Patch1113: create-var-run-resource-agents.patch
@@ -276,6 +276,7 @@ Patch1113: create-var-run-resource-agents.patch
Patch1114: notify-rmon-of-shutdown-before-shutting-down.patch
Patch1115: Fix-VG-activity-bug-in-heartbeat-LVM-script.patch
Patch1116: ocf-shellfuncs_change_logtag.patch
@ -19,7 +19,7 @@ index e3a7ce1..6be3418 100644
Obsoletes: heartbeat-resources <= %{version}
Provides: heartbeat-resources = %{version}
@@ -555,6 +556,7 @@ exit 1
@@ -609,6 +610,7 @@ exit 1
%patch1114 -p1
%patch1115 -p1
%patch1116 -p1
@ -28,5 +28,5 @@ index e3a7ce1..6be3418 100644
%build
if [ ! -f configure ]; then
--
1.9.1
2.7.4

View File

@ -1,4 +1,4 @@
From 057decd3b529f9bea96cf4071ae206c4dddc871c Mon Sep 17 00:00:00 2001
From 6dc1e2534a877800b35dd3cf7312c332cd83edb0 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:11:59 -0400
Subject: [PATCH 04/10] WRS:
@ -9,10 +9,10 @@ Subject: [PATCH 04/10] WRS:
1 file changed, 2 insertions(+)
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
index ba7af5b..28b6e50 100644
index 0725e97..3d8ece2 100644
--- a/SPECS/resource-agents.spec
+++ b/SPECS/resource-agents.spec
@@ -246,6 +246,7 @@ Patch1110: lvm_vg_activation.patch
@@ -273,6 +273,7 @@ Patch1110: lvm_vg_activation.patch
Patch1111: pgsql.patch
Patch1113: create-var-run-resource-agents.patch
@ -20,7 +20,7 @@ index ba7af5b..28b6e50 100644
Obsoletes: heartbeat-resources <= %{version}
Provides: heartbeat-resources = %{version}
@@ -549,6 +550,7 @@ exit 1
@@ -603,6 +604,7 @@ exit 1
%patch1111 -p1
%patch1113 -p1
@ -29,5 +29,5 @@ index ba7af5b..28b6e50 100644
%build
if [ ! -f configure ]; then
--
1.9.1
2.7.4

View File

@ -1,4 +1,4 @@
From 142af55450aa91fe2d7fc3586388efebae64af97 Mon Sep 17 00:00:00 2001
From 5da3820896a51fd018371bbc08900f22ca0ea4a3 Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Tue, 3 May 2016 21:53:21 -0400
Subject: [PATCH 1/1] Create /var/run/resource-agents, if needed
@ -8,10 +8,10 @@ Subject: [PATCH 1/1] Create /var/run/resource-agents, if needed
1 file changed, 5 insertions(+)
diff --git a/heartbeat/ocf-shellfuncs.in b/heartbeat/ocf-shellfuncs.in
index fd916e7..56f01e6 100644
index 7b5f831..3565e20 100644
--- a/heartbeat/ocf-shellfuncs.in
+++ b/heartbeat/ocf-shellfuncs.in
@@ -165,6 +165,11 @@ __ocf_set_defaults() {
@@ -166,6 +166,11 @@ __ocf_set_defaults() {
ha_log "ERROR: Need to tell us our resource instance name."
exit $OCF_ERR_ARGS
fi
@ -24,5 +24,5 @@ index fd916e7..56f01e6 100644
hadate() {
--
1.9.1
2.7.4

View File

@ -1,4 +1,4 @@
From ec5790e7d930bd3436d67319c5214a7bf64fa164 Mon Sep 17 00:00:00 2001
From a4b297ec4b5decaa1752a2f867ba890604804159 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:12:25 -0400
Subject: [PATCH 01/13] WRS: Patch1105: filesystem_rmon.patch
@ -111,7 +111,7 @@ index d834096..8cd9c6b 100755
notify) Filesystem_notify
;;
diff --git a/heartbeat/LVM b/heartbeat/LVM
index eae7a91..733d113 100755
index 425a60a..ba6c198 100755
--- a/heartbeat/LVM
+++ b/heartbeat/LVM
@@ -22,6 +22,7 @@
@ -122,7 +122,7 @@ index eae7a91..733d113 100755
#
#######################################################################
# Initialization:
@@ -711,6 +712,34 @@ then
@@ -699,6 +700,34 @@ then
exit $OCF_ERR_CONFIGURED
fi
@ -157,7 +157,7 @@ index eae7a91..733d113 100755
# Get the LVM version number, for this to work we assume(thanks to panjiam):
#
# LVM1 outputs like this
@@ -752,16 +781,37 @@ case "$1" in
@@ -740,16 +769,37 @@ case "$1" in
start)
LVM_validate_all
LVM_start $VOLUME
@ -200,5 +200,5 @@ index eae7a91..733d113 100755
validate-all) LVM_validate_all
;;
--
1.9.1
2.7.4

View File

@ -1,4 +1,7 @@
CGTS-5173: LVM ocf cleanup refs on stop
From 72fcaed4a9cc3c847278dd4fca88ba0bca88125a Mon Sep 17 00:00:00 2001
From: Vu Tran <vu.tran@windriver.com>
Date: Thu Sep 29 19:07:25 2016 -0400
Subject: CGTS-5173: LVM ocf cleanup refs on stop
In LVM ocf script, LVM_stop() fails if any of the created logical volume
dm block devices are being held by any process with the following error
@ -18,15 +21,16 @@ opening files and then umount the dm block devices.
* processes just hold/open dm block devices directly. We need to kill
these processes.
Signed-off-by: Sun Austin <austin.sun@intel.com>
---
heartbeat/LVM | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/heartbeat/LVM b/heartbeat/LVM
index 69f284c..e56f7d8 100755
index 1efb207..bde381c 100755
--- a/heartbeat/LVM
+++ b/heartbeat/LVM
@@ -616,6 +616,81 @@ EOF
@@ -601,6 +601,81 @@ EOF
}
#
@ -108,7 +112,7 @@ index 69f284c..e56f7d8 100755
# Disable the LVM volume
#
LVM_stop() {
@@ -647,6 +722,7 @@ LVM_stop() {
@@ -632,6 +707,7 @@ LVM_stop() {
break
fi
@ -117,5 +121,5 @@ index 69f284c..e56f7d8 100755
ocf_log warn "$vg still Active"
ocf_log info "Retry deactivating volume group $vg"
--
1.9.1
2.7.4

View File

@ -1,4 +1,4 @@
From 3304fb0e1f1eeb2bfe52611541c5dd12bdc908e0 Mon Sep 17 00:00:00 2001
From 577055560d55b388d479ef398ffd839792dc1996 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 15:12:54 -0400
Subject: [PATCH 06/13] WRS: Patch1110: lvm_vg_activation.patch
@ -8,10 +8,10 @@ Subject: [PATCH 06/13] WRS: Patch1110: lvm_vg_activation.patch
1 file changed, 116 insertions(+), 14 deletions(-)
diff --git a/heartbeat/LVM b/heartbeat/LVM
index 5de88b6..3a52e56 100755
index b0ca87a..38092f9 100755
--- a/heartbeat/LVM
+++ b/heartbeat/LVM
@@ -449,6 +449,81 @@ retry_exclusive_start()
@@ -437,6 +437,81 @@ retry_exclusive_start()
}
#
@ -93,7 +93,7 @@ index 5de88b6..3a52e56 100755
# Enable LVM volume
#
LVM_start() {
@@ -489,20 +564,47 @@ EOF
@@ -477,20 +552,47 @@ EOF
: ;;
esac
@ -156,5 +156,5 @@ index 5de88b6..3a52e56 100755
if LVM_status $vg; then
: OK Volume $vg activated just fine!
--
1.9.1
2.7.4

View File

@ -1,4 +1,4 @@
From bf3f5ed67ee862cbd4fd3f4f8c2c3760ebd88900 Mon Sep 17 00:00:00 2001
From f658722ec239a258cd3ec2e828ca3f37ba2fe536 Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Fri, 17 Jun 2016 00:31:20 -0400
Subject: [PATCH 1/1] Notify rmon of shutdown before shutting down LVM and
@ -30,10 +30,10 @@ index 05e4097..d5f3417 100755
esac
diff --git a/heartbeat/LVM b/heartbeat/LVM
index 3a52e56..69f284c 100755
index 38092f9..893ece8 100755
--- a/heartbeat/LVM
+++ b/heartbeat/LVM
@@ -891,10 +891,11 @@ case "$1" in
@@ -879,10 +879,11 @@ case "$1" in
fi
exit $rc;;
@ -50,5 +50,5 @@ index 3a52e56..69f284c 100755
status) LVM_status $VOLUME $1
rc=$?
--
1.9.1
2.7.4

View File

@ -1,4 +1,4 @@
From 3b5735f43d0ca1a3ca29b9fec50959340c21c995 Mon Sep 17 00:00:00 2001
From 64f5534579e8f14f723c48f317cd56badca225ee Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Thu, 25 Aug 2016 13:07:16 -0400
Subject: [PATCH 1/1] Set OCF_ prefix in logs for syslog destination sorting
@ -8,10 +8,10 @@ Subject: [PATCH 1/1] Set OCF_ prefix in logs for syslog destination sorting
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/heartbeat/ocf-shellfuncs.in b/heartbeat/ocf-shellfuncs.in
index 56f01e6..cfe5b21 100644
index 3565e20..688c150 100644
--- a/heartbeat/ocf-shellfuncs.in
+++ b/heartbeat/ocf-shellfuncs.in
@@ -179,9 +179,9 @@ hadate() {
@@ -180,9 +180,9 @@ hadate() {
set_logtag() {
if [ -z "$HA_LOGTAG" ]; then
if [ -n "$OCF_RESOURCE_INSTANCE" ]; then
@ -24,5 +24,5 @@ index 56f01e6..cfe5b21 100644
fi
}
--
1.9.1
2.7.4