Relocate cluster-resource-agents to
stx-integ/base/cluster-resource-agents Move content from stx-gplv2 into stx-integ Packages will be relocated to stx-integ: base/ bash cgcs-users cluster-resource-agents dpkg haproxy libfdt netpbm rpm database/ mariadb filesystem/ iscsi-initiator-utils filesystem/drbd/ drbd-tools kernel/kernel-modules/ drbd integrity intel-e1000e intel-i40e intel-i40evf intel-ixgbe intel-ixgbevf qat17 tpmdd ldap/ ldapscripts networking/ iptables net-tools Change-Id: I3a4ee4bde0adfd2a486bd5be3a151db85aa4947e Story: 2002801 Task: 22687 Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
parent
c419174e73
commit
dad45a06a5
16
base/cluster-resource-agents/PKG-INFO
Normal file
16
base/cluster-resource-agents/PKG-INFO
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Metadata-Version: 1.1
|
||||||
|
Name: resource-agents
|
||||||
|
Version: 3.9.5
|
||||||
|
Summary: Open Source HA Reusable Cluster Resource Scripts
|
||||||
|
Home-page:
|
||||||
|
Author:
|
||||||
|
Author-email:
|
||||||
|
License: GPLv2+ and LGPLv2+
|
||||||
|
|
||||||
|
Description:
|
||||||
|
A set of scripts to interface with several services to operate in a
|
||||||
|
High Availability environment for both Pacemaker and rgmanager
|
||||||
|
service managers.
|
||||||
|
|
||||||
|
|
||||||
|
Platform: UNKNOWN
|
1
base/cluster-resource-agents/centos/build_srpm.data
Normal file
1
base/cluster-resource-agents/centos/build_srpm.data
Normal file
@ -0,0 +1 @@
|
|||||||
|
TIS_PATCH_VER=12
|
@ -0,0 +1,28 @@
|
|||||||
|
From 2bc73669b8de70bf32d2f786b158738506e480ff 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 08/10] WRS:
|
||||||
|
0001-Update-package-versioning-for-TIS-format.patch
|
||||||
|
|
||||||
|
Conflicts:
|
||||||
|
SPECS/resource-agents.spec
|
||||||
|
---
|
||||||
|
SPECS/resource-agents.spec | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
|
||||||
|
index 6be3418..28a8129 100644
|
||||||
|
--- a/SPECS/resource-agents.spec
|
||||||
|
+++ b/SPECS/resource-agents.spec
|
||||||
|
@@ -48,7 +48,7 @@
|
||||||
|
Name: resource-agents
|
||||||
|
Summary: Open Source HA Reusable Cluster Resource Scripts
|
||||||
|
Version: 3.9.5
|
||||||
|
-Release: 105%{?dist}
|
||||||
|
+Release: 105.el7%{?_tis_dist}.%{tis_patch_ver}
|
||||||
|
License: GPLv2+, LGPLv2+ and ASL 2.0
|
||||||
|
URL: https://github.com/ClusterLabs/resource-agents
|
||||||
|
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
From d48b31c66589b0c5a9831dcf4123a80fa8ccd89a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Scott Little <scott.little@windriver.com>
|
||||||
|
Date: Tue, 6 Mar 2018 12:19:53 -0600
|
||||||
|
Subject: [PATCH 1/1] Disable creation of the debug package as it causes a seg
|
||||||
|
fault in dwz
|
||||||
|
|
||||||
|
---
|
||||||
|
SPECS/resource-agents.spec | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
|
||||||
|
index 2536cb7..e5fbbeb 100644
|
||||||
|
--- a/SPECS/resource-agents.spec
|
||||||
|
+++ b/SPECS/resource-agents.spec
|
||||||
|
@@ -35,6 +35,9 @@
|
||||||
|
} || %{?__transaction_systemd_inhibit:1}%{?!__transaction_systemd_inhibit:0}%{nil \
|
||||||
|
} || %(test -f /usr/lib/os-release; test $? -ne 0; echo $?))
|
||||||
|
|
||||||
|
+# Disable debug package, it currently triggers a segfault in dwz tool
|
||||||
|
+%define debug_package %{nil}
|
||||||
|
+
|
||||||
|
%global upstream_prefix ClusterLabs-resource-agents
|
||||||
|
%global upstream_version 5434e96
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
From 231334d30e9ad3f32dc915f973c71ac18d9c8191 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
|
||||||
|
|
||||||
|
---
|
||||||
|
SPECS/resource-agents.spec | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
|
||||||
|
index 28b6e50..832d588 100644
|
||||||
|
--- a/SPECS/resource-agents.spec
|
||||||
|
+++ b/SPECS/resource-agents.spec
|
||||||
|
@@ -247,6 +247,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
|
||||||
|
|
||||||
|
Obsoletes: heartbeat-resources <= %{version}
|
||||||
|
Provides: heartbeat-resources = %{version}
|
||||||
|
@@ -551,6 +552,7 @@ exit 1
|
||||||
|
|
||||||
|
%patch1113 -p1
|
||||||
|
%patch1114 -p1
|
||||||
|
+%patch1115 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
if [ ! -f configure ]; then
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
From c4165b39531872b7b56d497c4ebd86b5d1d79800 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Scott Little <scott.little@windriver.com>
|
||||||
|
Date: Wed, 25 Oct 2017 16:18:02 -0400
|
||||||
|
Subject: [PATCH]
|
||||||
|
Modify-error-code-of-bz1454699-fix-to-prevent-inactive-controller-reboot-loop
|
||||||
|
|
||||||
|
---
|
||||||
|
SPECS/resource-agents.spec | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
|
||||||
|
index 19580ef..2536cb7 100644
|
||||||
|
--- a/SPECS/resource-agents.spec
|
||||||
|
+++ b/SPECS/resource-agents.spec
|
||||||
|
@@ -252,6 +252,7 @@ Patch1116: ocf-shellfuncs_change_logtag.patch
|
||||||
|
Patch1117: lvm_cleanup_refs_on_stop.patch
|
||||||
|
Patch1118: ipaddr2_if_down.patch
|
||||||
|
Patch1119: ipaddr2_ignore_lo_if_state.patch
|
||||||
|
+Patch1120: Modify-error-code-of-bz1454699-fix-to-prevent-inactive-controller-reboot-loop.patch
|
||||||
|
|
||||||
|
Obsoletes: heartbeat-resources <= %{version}
|
||||||
|
Provides: heartbeat-resources = %{version}
|
||||||
|
@@ -561,6 +562,7 @@ exit 1
|
||||||
|
%patch1117 -p1
|
||||||
|
%patch1118 -p1
|
||||||
|
%patch1119 -p1
|
||||||
|
+%patch1120 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
if [ ! -f configure ]; then
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
12
base/cluster-resource-agents/centos/meta_patches/PATCH_ORDER
Normal file
12
base/cluster-resource-agents/centos/meta_patches/PATCH_ORDER
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
spec-include-TiS-patches.patch
|
||||||
|
spec-avoid-dir-collisions.patch
|
||||||
|
spec-add-create-var-run-resource-agents.patch
|
||||||
|
spec-notify-rmon-of-shutdown-before-shutting-down.patch
|
||||||
|
Fix-VG-activity-bug-in-heartbeat-LVM-script.patch
|
||||||
|
spec-include-tis-logtag-patch.patch
|
||||||
|
spec-lvm-cleanup-refs-on-stop.patch
|
||||||
|
0001-Update-package-versioning-for-TIS-format.patch
|
||||||
|
ipaddr2-if-down.patch
|
||||||
|
spec-add-ipaddr2-ignore-lo-state.patch
|
||||||
|
Modify-error-code-of-bz1454699-fix-to-prevent-inactive-controller-reboot-loop.patch
|
||||||
|
Disable-creation-of-the-debug-package.patch
|
@ -0,0 +1,32 @@
|
|||||||
|
From 1c5dc7640e843a553df5663305a739fc0c7aa9e1 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
|
||||||
|
|
||||||
|
---
|
||||||
|
SPECS/resource-agents.spec | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
|
||||||
|
index 28a8129..71d6cc4 100644
|
||||||
|
--- a/SPECS/resource-agents.spec
|
||||||
|
+++ b/SPECS/resource-agents.spec
|
||||||
|
@@ -250,6 +250,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
|
||||||
|
+Patch1118: ipaddr2_if_down.patch
|
||||||
|
|
||||||
|
Obsoletes: heartbeat-resources <= %{version}
|
||||||
|
Provides: heartbeat-resources = %{version}
|
||||||
|
@@ -557,6 +558,7 @@ exit 1
|
||||||
|
%patch1115 -p1
|
||||||
|
%patch1116 -p1
|
||||||
|
%patch1117 -p1
|
||||||
|
+%patch1118 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
if [ ! -f configure ]; then
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
From bc7c08fdf1a415af73757a4fc86e5c35fe9ab3f8 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
|
||||||
|
|
||||||
|
---
|
||||||
|
SPECS/resource-agents.spec | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
|
||||||
|
index 52c3c93..ba7af5b 100644
|
||||||
|
--- a/SPECS/resource-agents.spec
|
||||||
|
+++ b/SPECS/resource-agents.spec
|
||||||
|
@@ -245,6 +245,7 @@ Patch1109: umount-in-namespace.patch
|
||||||
|
Patch1110: lvm_vg_activation.patch
|
||||||
|
Patch1111: pgsql.patch
|
||||||
|
|
||||||
|
+Patch1113: create-var-run-resource-agents.patch
|
||||||
|
|
||||||
|
Obsoletes: heartbeat-resources <= %{version}
|
||||||
|
Provides: heartbeat-resources = %{version}
|
||||||
|
@@ -547,6 +548,7 @@ exit 1
|
||||||
|
%patch1110 -p1
|
||||||
|
%patch1111 -p1
|
||||||
|
|
||||||
|
+%patch1113 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
if [ ! -f configure ]; then
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
From 389034e186f6dfabdfa4bb75671a3f21d448bcbb 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
|
||||||
|
|
||||||
|
---
|
||||||
|
SPECS/resource-agents.spec | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
|
||||||
|
index 71d6cc4..460fc8f 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
|
||||||
|
Patch1116: ocf-shellfuncs_change_logtag.patch
|
||||||
|
Patch1117: lvm_cleanup_refs_on_stop.patch
|
||||||
|
Patch1118: ipaddr2_if_down.patch
|
||||||
|
+Patch1119: ipaddr2_ignore_lo_if_state.patch
|
||||||
|
|
||||||
|
Obsoletes: heartbeat-resources <= %{version}
|
||||||
|
Provides: heartbeat-resources = %{version}
|
||||||
|
@@ -559,6 +560,7 @@ exit 1
|
||||||
|
%patch1116 -p1
|
||||||
|
%patch1117 -p1
|
||||||
|
%patch1118 -p1
|
||||||
|
+%patch1119 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
if [ ! -f configure ]; then
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,56 @@
|
|||||||
|
From 72fdb47d6d79b950fc900c88d77605911cdcb4b1 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
|
||||||
|
|
||||||
|
---
|
||||||
|
SPECS/resource-agents.spec | 17 +++++++++--------
|
||||||
|
1 file changed, 9 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
|
||||||
|
index 453398a..52c3c93 100644
|
||||||
|
--- a/SPECS/resource-agents.spec
|
||||||
|
+++ b/SPECS/resource-agents.spec
|
||||||
|
@@ -642,14 +642,15 @@ rm -rf %{buildroot}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with linuxha}
|
||||||
|
-%dir /usr/lib/ocf
|
||||||
|
-%dir /usr/lib/ocf/resource.d
|
||||||
|
-%dir /usr/lib/ocf/lib
|
||||||
|
+#%dir /usr/lib/ocf
|
||||||
|
+#%dir /usr/lib/ocf/resource.d
|
||||||
|
+#%dir /usr/lib/ocf/lib
|
||||||
|
|
||||||
|
-/usr/lib/ocf/lib/heartbeat
|
||||||
|
+/usr/lib/ocf/lib/heartbeat/*
|
||||||
|
|
||||||
|
-/usr/lib/ocf/resource.d/heartbeat
|
||||||
|
-/usr/lib/ocf/resource.d/openstack
|
||||||
|
+/usr/lib/ocf/resource.d/heartbeat/*
|
||||||
|
+/usr/lib/ocf/resource.d/heartbeat/.ocf-*
|
||||||
|
+/usr/lib/ocf/resource.d/openstack/*
|
||||||
|
%if %{with rgmanager}
|
||||||
|
/usr/lib/ocf/resource.d/redhat
|
||||||
|
%endif
|
||||||
|
@@ -669,7 +670,7 @@ rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%{_includedir}/heartbeat
|
||||||
|
|
||||||
|
-%dir %attr (1755, root, root) %{_var}/run/resource-agents
|
||||||
|
+#%dir %attr (1755, root, root) %{_var}/run/resource-agents
|
||||||
|
|
||||||
|
%{_mandir}/man7/*.7*
|
||||||
|
|
||||||
|
@@ -780,7 +781,7 @@ rm -rf %{buildroot}
|
||||||
|
%exclude %{_mandir}/man8/ldirectord.8.gz
|
||||||
|
|
||||||
|
# For compatability with pre-existing agents
|
||||||
|
-%dir %{_sysconfdir}/ha.d
|
||||||
|
+#%dir %{_sysconfdir}/ha.d
|
||||||
|
%{_sysconfdir}/ha.d/shellfuncs
|
||||||
|
|
||||||
|
%{_libexecdir}/heartbeat
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,50 @@
|
|||||||
|
From 8d7740777cbbcdfa00f3e12b7e292aca2b696137 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 01/10] WRS: spec-include-TiS-patches.patch
|
||||||
|
|
||||||
|
---
|
||||||
|
SPECS/resource-agents.spec | 20 ++++++++++++++++++++
|
||||||
|
1 file changed, 20 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
|
||||||
|
index db6b69c..453398a 100644
|
||||||
|
--- a/SPECS/resource-agents.spec
|
||||||
|
+++ b/SPECS/resource-agents.spec
|
||||||
|
@@ -236,6 +236,16 @@ Patch175: bz1449681-2-saphana-saphanatopology-update-0.152.21.patch
|
||||||
|
Patch176: bz1342376-2-rabbitmq-cluster-backup-and-restore-users-policies.patch
|
||||||
|
Patch177: bz1342376-3-rabbitmq-cluster-backup-and-restore-users-policies.patch
|
||||||
|
|
||||||
|
+# WRS
|
||||||
|
+Patch1105: filesystem_rmon.patch
|
||||||
|
+Patch1106: new_ocf_return_codes.patch
|
||||||
|
+Patch1107: ipaddr2_check_if_state.patch
|
||||||
|
+Patch1108: copyright.patch
|
||||||
|
+Patch1109: umount-in-namespace.patch
|
||||||
|
+Patch1110: lvm_vg_activation.patch
|
||||||
|
+Patch1111: pgsql.patch
|
||||||
|
+
|
||||||
|
+
|
||||||
|
Obsoletes: heartbeat-resources <= %{version}
|
||||||
|
Provides: heartbeat-resources = %{version}
|
||||||
|
|
||||||
|
@@ -528,6 +538,16 @@ exit 1
|
||||||
|
%patch176 -p1
|
||||||
|
%patch177 -p1
|
||||||
|
|
||||||
|
+# WRS
|
||||||
|
+%patch1105 -p1
|
||||||
|
+%patch1106 -p1
|
||||||
|
+%patch1107 -p1
|
||||||
|
+%patch1108 -p1
|
||||||
|
+%patch1109 -p1
|
||||||
|
+%patch1110 -p1
|
||||||
|
+%patch1111 -p1
|
||||||
|
+
|
||||||
|
+
|
||||||
|
%build
|
||||||
|
if [ ! -f configure ]; then
|
||||||
|
./autogen.sh
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
From 80e779cf7c6f667ccca0d91c13229520649e2920 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
|
||||||
|
|
||||||
|
---
|
||||||
|
SPECS/resource-agents.spec | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
|
||||||
|
index 832d588..e3a7ce1 100644
|
||||||
|
--- a/SPECS/resource-agents.spec
|
||||||
|
+++ b/SPECS/resource-agents.spec
|
||||||
|
@@ -248,6 +248,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
|
||||||
|
+Patch1116: ocf-shellfuncs_change_logtag.patch
|
||||||
|
|
||||||
|
Obsoletes: heartbeat-resources <= %{version}
|
||||||
|
Provides: heartbeat-resources = %{version}
|
||||||
|
@@ -553,6 +554,7 @@ exit 1
|
||||||
|
%patch1113 -p1
|
||||||
|
%patch1114 -p1
|
||||||
|
%patch1115 -p1
|
||||||
|
+%patch1116 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
if [ ! -f configure ]; then
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
From 273da7710af8e7fbaf39eb1d31872089b77f0b0b 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
|
||||||
|
|
||||||
|
---
|
||||||
|
SPECS/resource-agents.spec | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
|
||||||
|
index e3a7ce1..6be3418 100644
|
||||||
|
--- a/SPECS/resource-agents.spec
|
||||||
|
+++ b/SPECS/resource-agents.spec
|
||||||
|
@@ -249,6 +249,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
|
||||||
|
+Patch1117: lvm_cleanup_refs_on_stop.patch
|
||||||
|
|
||||||
|
Obsoletes: heartbeat-resources <= %{version}
|
||||||
|
Provides: heartbeat-resources = %{version}
|
||||||
|
@@ -555,6 +556,7 @@ exit 1
|
||||||
|
%patch1114 -p1
|
||||||
|
%patch1115 -p1
|
||||||
|
%patch1116 -p1
|
||||||
|
+%patch1117 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
if [ ! -f configure ]; then
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
From 057decd3b529f9bea96cf4071ae206c4dddc871c 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:
|
||||||
|
spec-notify-rmon-of-shutdown-before-shutting-down.patch
|
||||||
|
|
||||||
|
---
|
||||||
|
SPECS/resource-agents.spec | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec
|
||||||
|
index ba7af5b..28b6e50 100644
|
||||||
|
--- a/SPECS/resource-agents.spec
|
||||||
|
+++ b/SPECS/resource-agents.spec
|
||||||
|
@@ -246,6 +246,7 @@ Patch1110: lvm_vg_activation.patch
|
||||||
|
Patch1111: pgsql.patch
|
||||||
|
|
||||||
|
Patch1113: create-var-run-resource-agents.patch
|
||||||
|
+Patch1114: notify-rmon-of-shutdown-before-shutting-down.patch
|
||||||
|
|
||||||
|
Obsoletes: heartbeat-resources <= %{version}
|
||||||
|
Provides: heartbeat-resources = %{version}
|
||||||
|
@@ -549,6 +550,7 @@ exit 1
|
||||||
|
%patch1111 -p1
|
||||||
|
|
||||||
|
%patch1113 -p1
|
||||||
|
+%patch1114 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
if [ ! -f configure ]; then
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,58 @@
|
|||||||
|
From 98591b479bd64c2835ab1e8884118c57dd499b9c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chris Friesen <chris.friesen@windriver.com>
|
||||||
|
Date: Tue, 21 Jun 2016 14:29:36 -0400
|
||||||
|
Subject: [PATCH] Fix VG activity bug in heartbeat/LVM script
|
||||||
|
|
||||||
|
There is currently an issue in the lvm2 package where if you create an LVM thin
|
||||||
|
pool, then create a thin volume in the pool, then the udev rule doesn't think
|
||||||
|
there should be a /dev// symlink for the thin pool, but "vgmknodes" and
|
||||||
|
"vgscan --mknodes" both think that there should be such a symlink. This is a
|
||||||
|
bug, but it's in the field in CentOS 7 at least and likely elsewhere.
|
||||||
|
|
||||||
|
The end result of this is that on such a system running either "vgscan
|
||||||
|
--mknodes" or "vgmknodes" and then running "vgchange -an " will
|
||||||
|
leave the /dev/ directory with a dangling symlink in it.
|
||||||
|
|
||||||
|
This breaks the LVM_status() function in this OCF script, since the
|
||||||
|
/dev/ directory exists and is not empty even though the volume
|
||||||
|
group is not active.
|
||||||
|
|
||||||
|
This commit changes the code to directly query lvm about the volume group
|
||||||
|
activity rather than relying on side effects.
|
||||||
|
---
|
||||||
|
heartbeat/LVM | 15 ++++++---------
|
||||||
|
1 file changed, 6 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/LVM b/heartbeat/LVM
|
||||||
|
index 1c23c05..d91a3bc 100755
|
||||||
|
--- a/heartbeat/LVM
|
||||||
|
+++ b/heartbeat/LVM
|
||||||
|
@@ -350,19 +350,16 @@ LVM_status() {
|
||||||
|
ocf_exit_reason "LVM Volume $1 is not available"
|
||||||
|
return $OCF_ERR_GENERIC
|
||||||
|
fi
|
||||||
|
-
|
||||||
|
- if [ -d /dev/$1 ]; then
|
||||||
|
- test "`cd /dev/$1 && ls`" != ""
|
||||||
|
- rc=$?
|
||||||
|
- if [ $rc -ne 0 ]; then
|
||||||
|
- ocf_exit_reason "VG $1 with no logical volumes is not supported by this RA!"
|
||||||
|
- fi
|
||||||
|
- fi
|
||||||
|
|
||||||
|
- if [ $rc -ne 0 ]; then
|
||||||
|
+ # Ask lvm whether the volume group is active. This maps to
|
||||||
|
+ # the question "Are there any logical volumes that are active in
|
||||||
|
+ # the specified volume group?".
|
||||||
|
+ lvs --noheadings -o selected -S lv_active=active,vg_name=${1}|grep -q 1
|
||||||
|
+ if [ $? -ne 0 ]; then
|
||||||
|
ocf_log $loglevel "LVM Volume $1 is not available (stopped)"
|
||||||
|
rc=$OCF_NOT_RUNNING
|
||||||
|
else
|
||||||
|
+ rc=0
|
||||||
|
case $(get_vg_mode) in
|
||||||
|
1) # exclusive with tagging.
|
||||||
|
# If vg is running, make sure the correct tag is present. Otherwise we
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
From b9fdbdf20d62655c9b529f744f8efb9fb66c5851 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Scott Little <scott.little@windriver.com>
|
||||||
|
Date: Wed, 25 Oct 2017 16:13:20 -0400
|
||||||
|
Subject: [PATCH] Modify error code of
|
||||||
|
bz1454699-LVM-status-check-for-missing-VG.patch to prevent controler-1 reboot
|
||||||
|
loop
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/LVM | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/LVM b/heartbeat/LVM
|
||||||
|
index 5347765..e4cd0ea 100755
|
||||||
|
--- a/heartbeat/LVM
|
||||||
|
+++ b/heartbeat/LVM
|
||||||
|
@@ -348,7 +348,7 @@ LVM_status() {
|
||||||
|
fi
|
||||||
|
if ! echo "$output" | grep -q "Found.*\"$1\""; then
|
||||||
|
ocf_exit_reason "LVM Volume $1 is not available"
|
||||||
|
- return $OCF_ERR_GENERIC
|
||||||
|
+ return $OCF_NOT_RUNNING
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ask lvm whether the volume group is active. This maps to
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
51
base/cluster-resource-agents/centos/patches/copyright.patch
Normal file
51
base/cluster-resource-agents/centos/patches/copyright.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
From 81bcbfb829001ccf61b515edb3d53ac8f15df334 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Scott Little <scott.little@windriver.com>
|
||||||
|
Date: Fri, 26 Aug 2016 15:06:10 -0400
|
||||||
|
Subject: [PATCH 04/12] WRS: Patch108: copyright.patch
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/Filesystem | 2 ++
|
||||||
|
heartbeat/LVM | 1 +
|
||||||
|
heartbeat/pgsql | 1 +
|
||||||
|
3 files changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
|
||||||
|
index 27f03d2..af821b2 100755
|
||||||
|
--- a/heartbeat/Filesystem
|
||||||
|
+++ b/heartbeat/Filesystem
|
||||||
|
@@ -2,6 +2,8 @@
|
||||||
|
#
|
||||||
|
# Support: linux-ha@lists.linux-ha.org
|
||||||
|
# License: GNU General Public License (GPL)
|
||||||
|
+#
|
||||||
|
+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# Filesystem
|
||||||
|
# Description: Manages a Filesystem on a shared storage medium.
|
||||||
|
diff --git a/heartbeat/LVM b/heartbeat/LVM
|
||||||
|
index e435e7b..c11fed7 100755
|
||||||
|
--- a/heartbeat/LVM
|
||||||
|
+++ b/heartbeat/LVM
|
||||||
|
@@ -10,6 +10,7 @@
|
||||||
|
# Support: linux-ha@lists.linux-ha.org
|
||||||
|
# License: GNU General Public License (GPL)
|
||||||
|
# Copyright: (C) 2002 - 2005 International Business Machines, Inc.
|
||||||
|
+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This code significantly inspired by the LVM resource
|
||||||
|
# in FailSafe by Lars Marowsky-Bree
|
||||||
|
diff --git a/heartbeat/pgsql b/heartbeat/pgsql
|
||||||
|
index 794f85e..b176b1d 100755
|
||||||
|
--- a/heartbeat/pgsql
|
||||||
|
+++ b/heartbeat/pgsql
|
||||||
|
@@ -9,6 +9,7 @@
|
||||||
|
#
|
||||||
|
# Copyright: 2006-2012 Serge Dubrouski <sergeyfd@gmail.com>
|
||||||
|
# and other Linux-HA contributors
|
||||||
|
+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved.
|
||||||
|
# License: GNU General Public License (GPL)
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From 142af55450aa91fe2d7fc3586388efebae64af97 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
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/ocf-shellfuncs.in | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/ocf-shellfuncs.in b/heartbeat/ocf-shellfuncs.in
|
||||||
|
index fd916e7..56f01e6 100644
|
||||||
|
--- a/heartbeat/ocf-shellfuncs.in
|
||||||
|
+++ b/heartbeat/ocf-shellfuncs.in
|
||||||
|
@@ -165,6 +165,11 @@ __ocf_set_defaults() {
|
||||||
|
ha_log "ERROR: Need to tell us our resource instance name."
|
||||||
|
exit $OCF_ERR_ARGS
|
||||||
|
fi
|
||||||
|
+
|
||||||
|
+ # TODO: Find a better way to ensure this dir exists
|
||||||
|
+ if [ ! -d "$HA_RSCTMP" ]; then
|
||||||
|
+ mkdir -p $HA_RSCTMP
|
||||||
|
+ fi
|
||||||
|
}
|
||||||
|
|
||||||
|
hadate() {
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,204 @@
|
|||||||
|
From ec5790e7d930bd3436d67319c5214a7bf64fa164 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
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/Filesystem | 59 +++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||||
|
heartbeat/LVM | 58 +++++++++++++++++++++++++++++++++++++++++++++++----
|
||||||
|
2 files changed, 110 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
|
||||||
|
index d834096..8cd9c6b 100755
|
||||||
|
--- a/heartbeat/Filesystem
|
||||||
|
+++ b/heartbeat/Filesystem
|
||||||
|
@@ -19,6 +19,7 @@
|
||||||
|
# OCF_RESKEY_run_fsck
|
||||||
|
# OCF_RESKEY_fast_stop
|
||||||
|
# OCF_RESKEY_force_clones
|
||||||
|
+# OCF_RESKEY_rmon_rsc_name
|
||||||
|
#
|
||||||
|
#OCF_RESKEY_device : name of block device for the filesystem. e.g. /dev/sda1, /dev/md0
|
||||||
|
# Or a -U or -L option for mount, or an NFS mount specification
|
||||||
|
@@ -30,6 +31,7 @@
|
||||||
|
#OCF_RESKEY_fast_stop : fast stop: yes(default)/no
|
||||||
|
#OCF_RESKEY_force_clones : allow running the resource as clone. e.g. local xfs mounts
|
||||||
|
# for each brick in a glusterfs setup
|
||||||
|
+#OCF_RESKEY_rmon_rsc_name: resource name to use when notifing RMON
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This assumes you want to manage a filesystem on a shared (SCSI) bus,
|
||||||
|
@@ -1137,20 +1139,65 @@ if [ "$OP" != "monitor" ]; then
|
||||||
|
ocf_log info "Running $OP for $DEVICE on $MOUNTPOINT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
+RMON_NOTIFY="/usr/local/bin/rmon_resource_notify"
|
||||||
|
+
|
||||||
|
+rmon_notify() {
|
||||||
|
+ local RSC_STATE=$1 TIMEOUT=$2
|
||||||
|
+
|
||||||
|
+ if [ -z "OCF_RESKEY_rmon_rsc_name" ]
|
||||||
|
+ then
|
||||||
|
+ ocf_log err "No RMON resource name given for $OCF_RESKEY_directory"
|
||||||
|
+ return
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ if [[ -x $RMON_NOTIFY ]]
|
||||||
|
+ then
|
||||||
|
+ $RMON_NOTIFY --resource-name $OCF_RESKEY_rmon_rsc_name \
|
||||||
|
+ --resource-state $RSC_STATE \
|
||||||
|
+ --resource-type mount \
|
||||||
|
+ --device $OCF_RESKEY_device \
|
||||||
|
+ --mount-point $OCF_RESKEY_directory \
|
||||||
|
+ --timeout $TIMEOUT \
|
||||||
|
+ >/dev/null 2>&1
|
||||||
|
+ else
|
||||||
|
+ ocf_log err "$RMON_NOTIFY not available, failed to execute: \
|
||||||
|
+$RMON_NOTIFY --resource-name $OCF_RESKEY_rmon_rsc_name \
|
||||||
|
+--resource-state $RSC_STATE --resource-type mount \
|
||||||
|
+--device $OCF_RESKEY_device --mount-point $OCF_RESKEY_directory \
|
||||||
|
+--timeout $TIMEOUT"
|
||||||
|
+ fi
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
# These operations do not require the clone checking + OCFS2
|
||||||
|
# initialization.
|
||||||
|
case $OP in
|
||||||
|
status) Filesystem_status
|
||||||
|
- exit $?
|
||||||
|
+ rc=$?
|
||||||
|
+ if [ $rc -eq $OCF_SUCCESS ]
|
||||||
|
+ then
|
||||||
|
+ rmon_notify "enabled" 300
|
||||||
|
+ else
|
||||||
|
+ rmon_notify "disabled" 300
|
||||||
|
+ fi
|
||||||
|
+ exit $rc
|
||||||
|
;;
|
||||||
|
monitor) Filesystem_monitor
|
||||||
|
- exit $?
|
||||||
|
+ rc=$?
|
||||||
|
+ if [ $rc -eq $OCF_SUCCESS ]
|
||||||
|
+ then
|
||||||
|
+ rmon_notify "enabled" 300
|
||||||
|
+ else
|
||||||
|
+ rmon_notify "disabled" 300
|
||||||
|
+ fi
|
||||||
|
+ exit $rc
|
||||||
|
;;
|
||||||
|
validate-all) Filesystem_validate_all
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
stop) Filesystem_stop
|
||||||
|
- exit $?
|
||||||
|
+ rc=$?
|
||||||
|
+ rmon_notify "disabled" 300
|
||||||
|
+ exit $rc
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@@ -1199,6 +1246,12 @@ fi
|
||||||
|
|
||||||
|
case $OP in
|
||||||
|
start) Filesystem_start
|
||||||
|
+ rc=$?
|
||||||
|
+ if [ $rc -eq $OCF_SUCCESS ]
|
||||||
|
+ then
|
||||||
|
+ rmon_notify "enabled" 300
|
||||||
|
+ fi
|
||||||
|
+ exit $rc
|
||||||
|
;;
|
||||||
|
notify) Filesystem_notify
|
||||||
|
;;
|
||||||
|
diff --git a/heartbeat/LVM b/heartbeat/LVM
|
||||||
|
index eae7a91..733d113 100755
|
||||||
|
--- a/heartbeat/LVM
|
||||||
|
+++ b/heartbeat/LVM
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
#
|
||||||
|
# OCF parameters are as below:
|
||||||
|
# OCF_RESKEY_volgrpname
|
||||||
|
+# OCF_RESKEY_rmon_rsc_name
|
||||||
|
#
|
||||||
|
#######################################################################
|
||||||
|
# Initialization:
|
||||||
|
@@ -711,6 +712,34 @@ then
|
||||||
|
exit $OCF_ERR_CONFIGURED
|
||||||
|
fi
|
||||||
|
|
||||||
|
+RMON_NOTIFY="/usr/local/bin/rmon_resource_notify"
|
||||||
|
+
|
||||||
|
+rmon_notify() {
|
||||||
|
+ local RSC_STATE=$1 TIMEOUT=$2
|
||||||
|
+
|
||||||
|
+ if [ -z "OCF_RESKEY_rmon_rsc_name" ]
|
||||||
|
+ then
|
||||||
|
+ ocf_log err "No RMON resource name given for $OCF_RESKEY_volgrpname"
|
||||||
|
+ return
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ if [[ -x $RMON_NOTIFY ]]
|
||||||
|
+ then
|
||||||
|
+ $RMON_NOTIFY --resource-name $OCF_RESKEY_rmon_rsc_name \
|
||||||
|
+ --resource-state $RSC_STATE \
|
||||||
|
+ --resource-type lvg \
|
||||||
|
+ --volume-group $OCF_RESKEY_volgrpname \
|
||||||
|
+ --timeout $TIMEOUT \
|
||||||
|
+ >/dev/null 2>&1
|
||||||
|
+ else
|
||||||
|
+ ocf_log err "$RMON_NOTIFY not available, failed to execute: \
|
||||||
|
+$RMON_NOTIFY --resource-name $OCF_RESKEY_rmon_rsc_name \
|
||||||
|
+--resource-state $RSC_STATE --resource-type lvg \
|
||||||
|
+--volume-group $OCF_RESKEY_volgrpname \
|
||||||
|
+--timeout $TIMEOUT"
|
||||||
|
+ fi
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
# 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
|
||||||
|
start)
|
||||||
|
LVM_validate_all
|
||||||
|
LVM_start $VOLUME
|
||||||
|
- exit $?;;
|
||||||
|
+ rc=$?
|
||||||
|
+ if [ $rc -eq $OCF_SUCCESS ]
|
||||||
|
+ then
|
||||||
|
+ rmon_notify "enabled" 300
|
||||||
|
+ fi
|
||||||
|
+ exit $rc;;
|
||||||
|
|
||||||
|
stop) LVM_stop $VOLUME
|
||||||
|
- exit $?;;
|
||||||
|
+ rc=$?
|
||||||
|
+ rmon_notify "disabled" 300
|
||||||
|
+ exit $rc;;
|
||||||
|
|
||||||
|
status) LVM_status $VOLUME $1
|
||||||
|
- exit $?;;
|
||||||
|
+ rc=$?
|
||||||
|
+ if [ $rc -eq $OCF_SUCCESS ]
|
||||||
|
+ then
|
||||||
|
+ rmon_notify "enabled" 300
|
||||||
|
+ else
|
||||||
|
+ rmon_notify "disabled" 300
|
||||||
|
+ fi
|
||||||
|
+ exit $rc;;
|
||||||
|
|
||||||
|
monitor) LVM_status $VOLUME
|
||||||
|
- exit $?;;
|
||||||
|
+ rc=$?
|
||||||
|
+ if [ $rc -eq $OCF_SUCCESS ]
|
||||||
|
+ then
|
||||||
|
+ rmon_notify "enabled" 300
|
||||||
|
+ else
|
||||||
|
+ rmon_notify "disabled" 300
|
||||||
|
+ fi
|
||||||
|
+ exit $rc;;
|
||||||
|
|
||||||
|
validate-all) LVM_validate_all
|
||||||
|
;;
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,58 @@
|
|||||||
|
From fb5a76d9050c60b601a5dbbad65ed3dbff041af1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Scott Little <scott.little@windriver.com>
|
||||||
|
Date: Mon, 2 Oct 2017 15:12:36 -0400
|
||||||
|
Subject: [PATCH 03/13] WRS: Patch1107: ipaddr2_check_if_state.patch
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/IPaddr2 | 21 ++++++++++++++++++---
|
||||||
|
1 file changed, 18 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2
|
||||||
|
index aef6dc7..67a7ca3 100755
|
||||||
|
--- a/heartbeat/IPaddr2
|
||||||
|
+++ b/heartbeat/IPaddr2
|
||||||
|
@@ -880,7 +880,12 @@ ip_start() {
|
||||||
|
local ip_status=`ip_served`
|
||||||
|
|
||||||
|
if [ "$ip_status" = "ok" ]; then
|
||||||
|
- exit $OCF_SUCCESS
|
||||||
|
+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ]
|
||||||
|
+ then
|
||||||
|
+ exit $OCF_SUCCESS
|
||||||
|
+ else
|
||||||
|
+ exit $OCF_ERR_GENERIC
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$IP_CIP" ] && [ $ip_status = "no" ] || [ $ip_status = "partial2" ]; then
|
||||||
|
@@ -939,7 +944,12 @@ ip_start() {
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
- exit $OCF_SUCCESS
|
||||||
|
+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ]
|
||||||
|
+ then
|
||||||
|
+ exit $OCF_SUCCESS
|
||||||
|
+ else
|
||||||
|
+ exit $OCF_ERR_GENERIC
|
||||||
|
+ fi
|
||||||
|
}
|
||||||
|
|
||||||
|
ip_stop() {
|
||||||
|
@@ -1015,7 +1025,12 @@ ip_monitor() {
|
||||||
|
case $ip_status in
|
||||||
|
ok)
|
||||||
|
$ARP_SEND_FUN refresh
|
||||||
|
- return $OCF_SUCCESS
|
||||||
|
+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ]
|
||||||
|
+ then
|
||||||
|
+ return $OCF_SUCCESS
|
||||||
|
+ else
|
||||||
|
+ return $OCF_NOT_RUNNING
|
||||||
|
+ fi
|
||||||
|
;;
|
||||||
|
partial|no|partial2)
|
||||||
|
exit $OCF_NOT_RUNNING
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,58 @@
|
|||||||
|
From 573f0835621c5e64c6270260f607624aea29d21a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bin Qian <bin.qian@windriver.com>
|
||||||
|
Date: Sat, 21 Jan 2017 02:36:39 -0500
|
||||||
|
Subject: [PATCH 1/1] ipaddr2_if_down
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/IPaddr2 | 21 ++++++++++++++++++---
|
||||||
|
1 file changed, 18 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2
|
||||||
|
index 67a7ca3..2cd822d 100755
|
||||||
|
--- a/heartbeat/IPaddr2
|
||||||
|
+++ b/heartbeat/IPaddr2
|
||||||
|
@@ -884,7 +884,12 @@ ip_start() {
|
||||||
|
then
|
||||||
|
exit $OCF_SUCCESS
|
||||||
|
else
|
||||||
|
- exit $OCF_ERR_GENERIC
|
||||||
|
+ if [ "$OCF_RESKEY_dc" = "yes" ]; then
|
||||||
|
+ ocf_log info "NIC $NIC is DOWN..."
|
||||||
|
+ exit $OCF_SUCCESS
|
||||||
|
+ else
|
||||||
|
+ exit $OCF_ERR_GENERIC
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
@@ -948,7 +953,12 @@ ip_start() {
|
||||||
|
then
|
||||||
|
exit $OCF_SUCCESS
|
||||||
|
else
|
||||||
|
- exit $OCF_ERR_GENERIC
|
||||||
|
+ if [ "$OCF_RESKEY_dc" = "yes" ]; then
|
||||||
|
+ ocf_log info "NIC $NIC is DOWN"
|
||||||
|
+ exit $OCF_SUCCESS
|
||||||
|
+ else
|
||||||
|
+ exit $OCF_ERR_GENERIC
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1029,7 +1039,12 @@ ip_monitor() {
|
||||||
|
then
|
||||||
|
return $OCF_SUCCESS
|
||||||
|
else
|
||||||
|
- return $OCF_NOT_RUNNING
|
||||||
|
+ if [ "$OCF_RESKEY_dc" = "yes" ]; then
|
||||||
|
+ ocf_log info "NIC $NIC is DOWN"
|
||||||
|
+ return $OCF_SUCCESS
|
||||||
|
+ else
|
||||||
|
+ return $OCF_NOT_RUNNING
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
partial|no|partial2)
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,43 @@
|
|||||||
|
From 81bb87debd2a683bad2173d6cb16327c776fe3b3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Scott Little <scott.little@windriver.com>
|
||||||
|
Date: Mon, 2 Oct 2017 15:13:46 -0400
|
||||||
|
Subject: [PATCH 13/13] WRS: Patch1119: ipaddr2_ignore_lo_if_state.patch
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/IPaddr2 | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2
|
||||||
|
index 2cd822d..59620d2 100755
|
||||||
|
--- a/heartbeat/IPaddr2
|
||||||
|
+++ b/heartbeat/IPaddr2
|
||||||
|
@@ -880,7 +880,7 @@ ip_start() {
|
||||||
|
local ip_status=`ip_served`
|
||||||
|
|
||||||
|
if [ "$ip_status" = "ok" ]; then
|
||||||
|
- if [ -n "`ip link show $NIC | grep \"state UP\"`" ]
|
||||||
|
+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ] || [ "$NIC" = "lo" ]
|
||||||
|
then
|
||||||
|
exit $OCF_SUCCESS
|
||||||
|
else
|
||||||
|
@@ -949,7 +949,7 @@ ip_start() {
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
- if [ -n "`ip link show $NIC | grep \"state UP\"`" ]
|
||||||
|
+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ] || [ "$NIC" = "lo" ]
|
||||||
|
then
|
||||||
|
exit $OCF_SUCCESS
|
||||||
|
else
|
||||||
|
@@ -1035,7 +1035,7 @@ ip_monitor() {
|
||||||
|
case $ip_status in
|
||||||
|
ok)
|
||||||
|
$ARP_SEND_FUN refresh
|
||||||
|
- if [ -n "`ip link show $NIC | grep \"state UP\"`" ]
|
||||||
|
+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ] || [ "$NIC" = "lo" ]
|
||||||
|
then
|
||||||
|
return $OCF_SUCCESS
|
||||||
|
else
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,121 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
err ERROR: Logical volume cinder-volumes/volume-96a8becd-a1c1-4508-8b25-9bcbcfeff2fa
|
||||||
|
contains a filesystem in use. Can't deactivate volume group "cinder-volumes"
|
||||||
|
with 1 open logical volume(s)
|
||||||
|
|
||||||
|
So here we want to have defensive code to scan through any process that
|
||||||
|
holds what dm block devices and causes LVM_stop() to fail. There are
|
||||||
|
2 cases:
|
||||||
|
|
||||||
|
* dm block devices are mounted and processes are accessing files located
|
||||||
|
in this mount point. We first need to kill all the processes which are
|
||||||
|
opening files and then umount the dm block devices.
|
||||||
|
|
||||||
|
* processes just hold/open dm block devices directly. We need to kill
|
||||||
|
these processes.
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/LVM | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 76 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/LVM b/heartbeat/LVM
|
||||||
|
index 69f284c..e56f7d8 100755
|
||||||
|
--- a/heartbeat/LVM
|
||||||
|
+++ b/heartbeat/LVM
|
||||||
|
@@ -616,6 +616,81 @@ EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
+# Kill provided process that holds lv
|
||||||
|
+#
|
||||||
|
+log_and_kill_process_hold_lv() {
|
||||||
|
+ p_info=$(ps -lfLp ${1} | tail -1)
|
||||||
|
+ ocf_log warn "lv ${2} is being held by this process (will be forced killed):"
|
||||||
|
+ ocf_log warn ${p_info}
|
||||||
|
+ kill -s KILL ${1}
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#
|
||||||
|
+# Scan for processes that hold any lvs and kill them
|
||||||
|
+#
|
||||||
|
+scan_and_kill_processes_hold_lv() {
|
||||||
|
+ vg_name=${1}
|
||||||
|
+
|
||||||
|
+ # Get list of logical volumes which are busy
|
||||||
|
+ lv_paths=$(lvdisplay -c ${vg_name} | awk -F ":" '{print $1}')
|
||||||
|
+ for lv_path in ${lv_paths}; do
|
||||||
|
+ open_num=$(lvdisplay ${lv_path} | grep "# open" | awk '{print $3}')
|
||||||
|
+ if [ ${open_num} -gt 0 ]; then
|
||||||
|
+ lv_name=$(lvdisplay ${lv_path} | grep "LV Name" | awk '{print $3}')
|
||||||
|
+ lv_block=$(lvdisplay ${lv_path} | grep "Block device" | awk '{print $3}')
|
||||||
|
+
|
||||||
|
+ lv_list="${lv_list}
|
||||||
|
+${lv_name}|${lv_block}"
|
||||||
|
+ lv_block_list="${lv_block_list} ${lv_block}"
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
+
|
||||||
|
+ # Exit if there is no busy logical volume
|
||||||
|
+ [ -z "${lv_list}" ] && exit 0
|
||||||
|
+
|
||||||
|
+ # Checking to see if any of these busy logical volumes are caused by mount
|
||||||
|
+ mountinfo=$(cat /proc/1/mountinfo)
|
||||||
|
+ while read -r line; do
|
||||||
|
+ mount_majorminor=$(echo ${line} | awk '{print $3}')
|
||||||
|
+ mount_point=$(echo ${line} | awk '{print $5}')
|
||||||
|
+
|
||||||
|
+ for lv in ${lv_block_list}; do
|
||||||
|
+ if [ "${lv}" == "${mount_majorminor}" ]; then
|
||||||
|
+ lv_name=$(echo "${lv_list}" | grep ${lv} | awk -F "|" '{print $1}')
|
||||||
|
+ ocf_log warn "lv ${lv_name} is busy mounted at ${mount_point} (will be forced unmounted)"
|
||||||
|
+ processes_holding_mount_point=$(fuser -m ${mount_point} 2>/dev/null)
|
||||||
|
+ if [ -n "${processes_holding_mount_point}" ]; then
|
||||||
|
+ for p in ${processes_holding_mount_point}; do
|
||||||
|
+ log_and_kill_process_hold_lv "${p}" "${lv_name}"
|
||||||
|
+ done
|
||||||
|
+ fi
|
||||||
|
+ umount ${mount_point}
|
||||||
|
+ [ $? -ne 0 ] && ocf_log warn "Cannot umount ${mount_point}"
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
+ done <<< "${mountinfo}"
|
||||||
|
+
|
||||||
|
+ # Now checking to see if any process holding these logical volumes
|
||||||
|
+ all_processes=$(ps -e | awk '{print $1}')
|
||||||
|
+ for p in ${all_processes}; do
|
||||||
|
+ [ ! -d /proc/${p}/fd ] && continue
|
||||||
|
+ opened_file_list=$(ls -l /proc/${p}/fd | awk -F "->" '{print $2}')
|
||||||
|
+
|
||||||
|
+ for f in ${opened_file_list}; do
|
||||||
|
+ [ ! -b "${f}" ] && continue
|
||||||
|
+ f_majorminor=$(printf "%d:%d" $(stat -c '0x%t 0x%T' ${f}))
|
||||||
|
+
|
||||||
|
+ for lv in ${lv_block_list}; do
|
||||||
|
+ if [ "${lv}" == "${f_majorminor}" ]; then
|
||||||
|
+ lv_name=$(echo "${lv_list}" | grep ${lv} | awk -F "|" '{print $1}')
|
||||||
|
+ log_and_kill_process_hold_lv "${p}" "${lv_name}"
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
+ done
|
||||||
|
+ done
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#
|
||||||
|
# Disable the LVM volume
|
||||||
|
#
|
||||||
|
LVM_stop() {
|
||||||
|
@@ -647,6 +722,7 @@ LVM_stop() {
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
|
+ scan_and_kill_processes_hold_lv $vg
|
||||||
|
res=$OCF_ERR_GENERIC
|
||||||
|
ocf_log warn "$vg still Active"
|
||||||
|
ocf_log info "Retry deactivating volume group $vg"
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,160 @@
|
|||||||
|
From 3304fb0e1f1eeb2bfe52611541c5dd12bdc908e0 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
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/LVM | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++-------
|
||||||
|
1 file changed, 116 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/LVM b/heartbeat/LVM
|
||||||
|
index 5de88b6..3a52e56 100755
|
||||||
|
--- a/heartbeat/LVM
|
||||||
|
+++ b/heartbeat/LVM
|
||||||
|
@@ -449,6 +449,81 @@ retry_exclusive_start()
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
+# Activate one volume explicitly.
|
||||||
|
+#
|
||||||
|
+activate_volume() {
|
||||||
|
+ ocf_run lvchange $1 /dev/${2}/$3
|
||||||
|
+ if [ $? -eq 0 ] ; then
|
||||||
|
+ ocf_log info "Succesfully activated $LV."
|
||||||
|
+ else
|
||||||
|
+ ocf_log err "Problem activating $LV."
|
||||||
|
+ fi
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#
|
||||||
|
+# Kick off parallel activation of all volumes
|
||||||
|
+#
|
||||||
|
+activate_all_volumes() {
|
||||||
|
+ VG=$1
|
||||||
|
+ shift
|
||||||
|
+ lvchange_args="$*"
|
||||||
|
+
|
||||||
|
+ # Get the list of volumes, without the first line which is column headings.
|
||||||
|
+ VOLS=`lvs $VG |tail -n +2`
|
||||||
|
+
|
||||||
|
+ while read -r LINE; do
|
||||||
|
+ # Convert the line into an array.
|
||||||
|
+ LINE_ARRAY=($LINE)
|
||||||
|
+
|
||||||
|
+ # First array element is the volume/snapshot name.
|
||||||
|
+ LV=${LINE_ARRAY[0]}
|
||||||
|
+
|
||||||
|
+ # Third array element is the attributes.
|
||||||
|
+ ATTR=${LINE_ARRAY[2]}
|
||||||
|
+
|
||||||
|
+ # Fifth character in the attributes is "a" if it's active.
|
||||||
|
+ ACTIVE=${ATTR:4:1}
|
||||||
|
+ if [ "$ACTIVE" == "a" ]; then
|
||||||
|
+ ocf_log info "$LV is already active."
|
||||||
|
+ continue
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ SNAPSHOT_ORIGIN=${LINE_ARRAY[4]}
|
||||||
|
+ if [ "$SNAPSHOT_ORIGIN" != "" ] ; then
|
||||||
|
+ # If this is a snapshot, don't activate it.
|
||||||
|
+ continue
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ ( activate_volume "$*" $VG $LV ) &
|
||||||
|
+ done <<< "$VOLS"
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#
|
||||||
|
+# Scan for inactive volumes and log any that are found.
|
||||||
|
+#
|
||||||
|
+log_inactive_volumes() {
|
||||||
|
+ # Get the list of volumes, without the first line which is column headings.
|
||||||
|
+ VOLS=`lvs $1 |tail -n +2`
|
||||||
|
+
|
||||||
|
+ while read -r LINE; do
|
||||||
|
+ # Convert the line into an array.
|
||||||
|
+ LINE_ARRAY=($LINE)
|
||||||
|
+
|
||||||
|
+ # First array element is the volume/snapshot name.
|
||||||
|
+ LV=${LINE_ARRAY[0]}
|
||||||
|
+
|
||||||
|
+ # Third array element is the attributes.
|
||||||
|
+ ATTR=${LINE_ARRAY[2]}
|
||||||
|
+
|
||||||
|
+ # Fifth character in the attributes is "a" if it's active.
|
||||||
|
+ ACTIVE=${ATTR:4:1}
|
||||||
|
+ if [ "$ACTIVE" != "a" ]; then
|
||||||
|
+ ocf_log err "Volume $LV is not active after expiry of timeout."
|
||||||
|
+ fi
|
||||||
|
+ done <<< "$VOLS"
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#
|
||||||
|
# Enable LVM volume
|
||||||
|
#
|
||||||
|
LVM_start() {
|
||||||
|
@@ -489,20 +564,47 @@ EOF
|
||||||
|
: ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
- if ! ocf_run vgchange $vgchange_options $vg; then
|
||||||
|
- if [ $clvmd -eq 0 ]; then
|
||||||
|
- return $OCF_ERR_GENERIC
|
||||||
|
- fi
|
||||||
|
-
|
||||||
|
- # Failure to exclusively activate cluster vg.:
|
||||||
|
- # This could be caused by a remotely active LV, Attempt
|
||||||
|
- # to disable volume group cluster wide and try again.
|
||||||
|
- # Allow for some settling
|
||||||
|
- sleep 5
|
||||||
|
- if ! retry_exclusive_start; then
|
||||||
|
- return $OCF_ERR_GENERIC
|
||||||
|
- fi
|
||||||
|
- fi
|
||||||
|
+ # Kick off activation of all volumes. If it doesn't complete within
|
||||||
|
+ # the timeout period, then we'll log the not-yet-activated volumes and
|
||||||
|
+ # continue on.
|
||||||
|
+ (ocf_run vgchange $vgchange_options $1) & PID=$!
|
||||||
|
+
|
||||||
|
+ # Check every second for up to TIMEOUT seconds whether the vgchange has
|
||||||
|
+ # completed.
|
||||||
|
+ TIMEOUT=300
|
||||||
|
+ TIMED_OUT=true
|
||||||
|
+ SECONDS=0;
|
||||||
|
+ PARALLEL_ACTIVATE_DELAY=10
|
||||||
|
+ PARALLEL_ACTIVATE_DONE=false
|
||||||
|
+ while [ $SECONDS -lt $TIMEOUT ] ; do
|
||||||
|
+ kill -0 $PID &> /dev/null
|
||||||
|
+ if [ $? -eq 1 ] ; then
|
||||||
|
+ # process with pid of $PID doesn't exist, vgchange command completed
|
||||||
|
+ TIMED_OUT=false
|
||||||
|
+ break
|
||||||
|
+ fi
|
||||||
|
+ if [ $SECONDS -ge $PARALLEL_ACTIVATE_DELAY ] && \
|
||||||
|
+ [ "$PARALLEL_ACTIVATE_DONE" != true ] && \
|
||||||
|
+ [ "$1" == "cinder-volumes" ] ; then
|
||||||
|
+ # This will kick off parallel activation of all LVs in the VG.
|
||||||
|
+ # The delay is to ensure the VG is activated first.
|
||||||
|
+ PARALLEL_ACTIVATE_DONE=true
|
||||||
|
+ ocf_log info Explicitly activating all volumes in $1 with: $vgchange_options
|
||||||
|
+ activate_all_volumes $1 $vgchange_options
|
||||||
|
+ fi
|
||||||
|
+ sleep 1
|
||||||
|
+ done
|
||||||
|
+
|
||||||
|
+ if [ "$TIMED_OUT" = true ] ; then
|
||||||
|
+ ocf_log err "Timed out running ocf_run vgchange $vgchange_options $1"
|
||||||
|
+ log_inactive_volumes $1
|
||||||
|
+ else
|
||||||
|
+ # Child process completed, get its status.
|
||||||
|
+ wait $PID
|
||||||
|
+ if [ $? -ne 0 ] ; then
|
||||||
|
+ return $OCF_ERR_GENERIC
|
||||||
|
+ fi
|
||||||
|
+ fi
|
||||||
|
|
||||||
|
if LVM_status $vg; then
|
||||||
|
: OK Volume $vg activated just fine!
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
From 111343419dd381d81303354dad48cca5095ab080 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Scott Little <scott.little@windriver.com>
|
||||||
|
Date: Fri, 26 Aug 2016 15:06:02 -0400
|
||||||
|
Subject: [PATCH 02/12] WRS: Patch106: new_ocf_return_codes.patch
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/ocf-returncodes | 35 +++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 35 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/ocf-returncodes b/heartbeat/ocf-returncodes
|
||||||
|
index dd5f017..9200889 100644
|
||||||
|
--- a/heartbeat/ocf-returncodes
|
||||||
|
+++ b/heartbeat/ocf-returncodes
|
||||||
|
@@ -4,6 +4,7 @@
|
||||||
|
#
|
||||||
|
# Copyright (c) 2004 SUSE LINUX AG, Andrew Beekhof
|
||||||
|
# All Rights Reserved.
|
||||||
|
+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
@@ -53,3 +54,37 @@ OCF_NOT_RUNNING=7
|
||||||
|
#
|
||||||
|
OCF_RUNNING_MASTER=8
|
||||||
|
OCF_FAILED_MASTER=9
|
||||||
|
+
|
||||||
|
+# Non-standard values particular to Wind River deployments.
|
||||||
|
+#
|
||||||
|
+# OCF does not include the concept of data sync states for master/slave
|
||||||
|
+# resources.
|
||||||
|
+#
|
||||||
|
+# OCF_DATA_INCONSISTENT:
|
||||||
|
+# The resource's data is not useable.
|
||||||
|
+#
|
||||||
|
+# OCF_DATA_OUTDATED:
|
||||||
|
+# The resource's data is consistent, but a peer with more recent data
|
||||||
|
+# has been seen.
|
||||||
|
+#
|
||||||
|
+# OCF_DATA_CONSISTENT:
|
||||||
|
+# The resource's data is consistent, but it is unsure that this is the
|
||||||
|
+# most recent data.
|
||||||
|
+#
|
||||||
|
+# OCF_SYNC:
|
||||||
|
+# The resource is syncing data.
|
||||||
|
+#
|
||||||
|
+# OCF_STANDALONE:
|
||||||
|
+# The resource is operating as standalone. No peer is available or
|
||||||
|
+# syncing is not possible (i.e. split brain fencing).
|
||||||
|
+#
|
||||||
|
+OCF_DATA_INCONSISTENT=32
|
||||||
|
+OCF_DATA_OUTDATED=33
|
||||||
|
+OCF_DATA_CONSISTENT=34
|
||||||
|
+OCF_DATA_SYNC=35
|
||||||
|
+OCF_DATA_STANDALONE=36
|
||||||
|
+OCF_RUNNING_MASTER_DATA_INCONSISTENT=37
|
||||||
|
+OCF_RUNNING_MASTER_DATA_OUTDATED=38
|
||||||
|
+OCF_RUNNING_MASTER_DATA_CONSISTENT=39
|
||||||
|
+OCF_RUNNING_MASTER_DATA_SYNC=40
|
||||||
|
+OCF_RUNNING_MASTER_DATA_STANDALONE=41
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
From bf3f5ed67ee862cbd4fd3f4f8c2c3760ebd88900 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
|
||||||
|
Filesystem
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/Filesystem | 9 +++++----
|
||||||
|
heartbeat/LVM | 9 +++++----
|
||||||
|
2 files changed, 10 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
|
||||||
|
index 05e4097..d5f3417 100755
|
||||||
|
--- a/heartbeat/Filesystem
|
||||||
|
+++ b/heartbeat/Filesystem
|
||||||
|
@@ -1200,10 +1200,11 @@ case $OP in
|
||||||
|
validate-all) Filesystem_validate_all
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
- stop) Filesystem_stop
|
||||||
|
- rc=$?
|
||||||
|
- rmon_notify "disabled" 300
|
||||||
|
- exit $rc
|
||||||
|
+ stop)
|
||||||
|
+ rmon_notify "disabled" 300
|
||||||
|
+ Filesystem_stop
|
||||||
|
+ rc=$?
|
||||||
|
+ exit $rc
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
diff --git a/heartbeat/LVM b/heartbeat/LVM
|
||||||
|
index 3a52e56..69f284c 100755
|
||||||
|
--- a/heartbeat/LVM
|
||||||
|
+++ b/heartbeat/LVM
|
||||||
|
@@ -891,10 +891,11 @@ case "$1" in
|
||||||
|
fi
|
||||||
|
exit $rc;;
|
||||||
|
|
||||||
|
- stop) LVM_stop $VOLUME
|
||||||
|
- rc=$?
|
||||||
|
- rmon_notify "disabled" 300
|
||||||
|
- exit $rc;;
|
||||||
|
+ stop)
|
||||||
|
+ rmon_notify "disabled" 300
|
||||||
|
+ LVM_stop $VOLUME
|
||||||
|
+ rc=$?
|
||||||
|
+ exit $rc;;
|
||||||
|
|
||||||
|
status) LVM_status $VOLUME $1
|
||||||
|
rc=$?
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From 3b5735f43d0ca1a3ca29b9fec50959340c21c995 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
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/ocf-shellfuncs.in | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/ocf-shellfuncs.in b/heartbeat/ocf-shellfuncs.in
|
||||||
|
index 56f01e6..cfe5b21 100644
|
||||||
|
--- a/heartbeat/ocf-shellfuncs.in
|
||||||
|
+++ b/heartbeat/ocf-shellfuncs.in
|
||||||
|
@@ -179,9 +179,9 @@ hadate() {
|
||||||
|
set_logtag() {
|
||||||
|
if [ -z "$HA_LOGTAG" ]; then
|
||||||
|
if [ -n "$OCF_RESOURCE_INSTANCE" ]; then
|
||||||
|
- HA_LOGTAG="$__SCRIPT_NAME($OCF_RESOURCE_INSTANCE)[$$]"
|
||||||
|
+ HA_LOGTAG="OCF_$__SCRIPT_NAME($OCF_RESOURCE_INSTANCE)[$$]"
|
||||||
|
else
|
||||||
|
- HA_LOGTAG="$__SCRIPT_NAME[$$]"
|
||||||
|
+ HA_LOGTAG="OCF_$__SCRIPT_NAME[$$]"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
87
base/cluster-resource-agents/centos/patches/pgsql.patch
Normal file
87
base/cluster-resource-agents/centos/patches/pgsql.patch
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
From 386e3919b703c5a3d06edfc5b078ab67604139ab Mon Sep 17 00:00:00 2001
|
||||||
|
From: Scott Little <scott.little@windriver.com>
|
||||||
|
Date: Mon, 2 Oct 2017 15:12:59 -0400
|
||||||
|
Subject: [PATCH 07/13] WRS: Patch1111: pgsql.patch
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/pgsql | 23 ++++++++++++++++++++---
|
||||||
|
1 file changed, 20 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/pgsql b/heartbeat/pgsql
|
||||||
|
index 768608e..28cc046 100755
|
||||||
|
--- a/heartbeat/pgsql
|
||||||
|
+++ b/heartbeat/pgsql
|
||||||
|
@@ -38,6 +38,7 @@ get_pgsql_param() {
|
||||||
|
OCF_RESKEY_pgctl_default=/usr/bin/pg_ctl
|
||||||
|
OCF_RESKEY_psql_default=/usr/bin/psql
|
||||||
|
OCF_RESKEY_pgdata_default=/var/lib/pgsql/data
|
||||||
|
+OCF_RESKEY_pgconf_default=/etc/postgresql
|
||||||
|
OCF_RESKEY_pgdba_default=postgres
|
||||||
|
OCF_RESKEY_pghost_default=""
|
||||||
|
OCF_RESKEY_pgport_default=5432
|
||||||
|
@@ -67,10 +68,11 @@ OCF_RESKEY_stop_escalate_in_slave_default=30
|
||||||
|
: ${OCF_RESKEY_pgctl=${OCF_RESKEY_pgctl_default}}
|
||||||
|
: ${OCF_RESKEY_psql=${OCF_RESKEY_psql_default}}
|
||||||
|
: ${OCF_RESKEY_pgdata=${OCF_RESKEY_pgdata_default}}
|
||||||
|
+: ${OCF_RESKEY_pgconf=${OCF_RESKEY_pgconf_default}}
|
||||||
|
: ${OCF_RESKEY_pgdba=${OCF_RESKEY_pgdba_default}}
|
||||||
|
: ${OCF_RESKEY_pghost=${OCF_RESKEY_pghost_default}}
|
||||||
|
: ${OCF_RESKEY_pgport=${OCF_RESKEY_pgport_default}}
|
||||||
|
-: ${OCF_RESKEY_config=${OCF_RESKEY_pgdata}/postgresql.conf}
|
||||||
|
+: ${OCF_RESKEY_config=${OCF_RESKEY_pgconf}/postgresql.conf}
|
||||||
|
: ${OCF_RESKEY_start_opt=${OCF_RESKEY_start_opt_default}}
|
||||||
|
: ${OCF_RESKEY_pgdb=${OCF_RESKEY_pgdb_default}}
|
||||||
|
: ${OCF_RESKEY_logfile=${OCF_RESKEY_logfile_default}}
|
||||||
|
@@ -166,6 +168,14 @@ Path to PostgreSQL data directory.
|
||||||
|
<content type="string" default="${OCF_RESKEY_pgdata_default}" />
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
+<parameter name="pgconf" unique="0" required="0">
|
||||||
|
+<longdesc lang="en">
|
||||||
|
+Path to PostgreSQL config directory.
|
||||||
|
+</longdesc>
|
||||||
|
+<shortdesc lang="en">pgconf</shortdesc>
|
||||||
|
+<content type="string" default="${OCF_RESKEY_pgconf_default}" />
|
||||||
|
+</parameter>
|
||||||
|
+
|
||||||
|
<parameter name="pgdba" unique="0" required="0">
|
||||||
|
<longdesc lang="en">
|
||||||
|
User that owns PostgreSQL.
|
||||||
|
@@ -220,7 +230,7 @@ SQL script that will be used for monitor operations.
|
||||||
|
Path to the PostgreSQL configuration file for the instance.
|
||||||
|
</longdesc>
|
||||||
|
<shortdesc lang="en">Configuration file</shortdesc>
|
||||||
|
-<content type="string" default="${OCF_RESKEY_pgdata}/postgresql.conf" />
|
||||||
|
+<content type="string" default="${OCF_RESKEY_pgconf}/postgresql.conf" />
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
<parameter name="pgdb" unique="0" required="0">
|
||||||
|
@@ -549,6 +559,12 @@ pgsql_real_start() {
|
||||||
|
ocf_log debug "PostgreSQL still hasn't started yet. Waiting..."
|
||||||
|
done
|
||||||
|
|
||||||
|
+ # WRS: Create an unversioned symlink under /var/run so SM can easily
|
||||||
|
+ # find the PID file.
|
||||||
|
+ if [ ! -h $PIDFILE_SYMLINK ]; then
|
||||||
|
+ /bin/ln -s $PIDFILE $PIDFILE_SYMLINK
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
ocf_log info "PostgreSQL is started."
|
||||||
|
return $rc
|
||||||
|
}
|
||||||
|
@@ -1756,10 +1772,11 @@ fi
|
||||||
|
|
||||||
|
|
||||||
|
PIDFILE=${OCF_RESKEY_pgdata}/postmaster.pid
|
||||||
|
+PIDFILE_SYMLINK=/var/run/postmaster.pid
|
||||||
|
BACKUPLABEL=${OCF_RESKEY_pgdata}/backup_label
|
||||||
|
RESOURCE_NAME=`echo $OCF_RESOURCE_INSTANCE | cut -d ":" -f 1`
|
||||||
|
PGSQL_WAL_RECEIVER_STATUS_ATTR="${RESOURCE_NAME}-receiver-status"
|
||||||
|
-RECOVERY_CONF=${OCF_RESKEY_pgdata}/recovery.conf
|
||||||
|
+RECOVERY_CONF=${OCF_RESKEY_pgconf}/recovery.conf
|
||||||
|
NODENAME=$(ocf_local_nodename | tr '[A-Z]' '[a-z]')
|
||||||
|
|
||||||
|
if is_replication; then
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
From eb45b8271ce64a046d41c93b1cffd641245ce55f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Scott Little <scott.little@windriver.com>
|
||||||
|
Date: Mon, 2 Oct 2017 15:12:48 -0400
|
||||||
|
Subject: [PATCH 05/13] WRS: Patch1109: umount-in-namespace.patch
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/Filesystem | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
|
||||||
|
index f536298..05e4097 100755
|
||||||
|
--- a/heartbeat/Filesystem
|
||||||
|
+++ b/heartbeat/Filesystem
|
||||||
|
@@ -804,6 +804,10 @@ signal_processes() {
|
||||||
|
}
|
||||||
|
try_umount() {
|
||||||
|
local SUB=$1
|
||||||
|
+
|
||||||
|
+ # We need to ensure we umount in namespaces, too
|
||||||
|
+ /usr/sbin/umount-in-namespace $SUB
|
||||||
|
+
|
||||||
|
$UMOUNT $umount_force $SUB
|
||||||
|
list_mounts | grep -q " $SUB " >/dev/null 2>&1 || {
|
||||||
|
ocf_log info "unmounted $SUB successfully"
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
1
base/cluster-resource-agents/centos/srpm_path
Normal file
1
base/cluster-resource-agents/centos/srpm_path
Normal file
@ -0,0 +1 @@
|
|||||||
|
mirror:Source/resource-agents-3.9.5-105.el7.src.rpm
|
@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
heartbeat/Filesystem | 3 ++-
|
||||||
|
heartbeat/LVM | 1 +
|
||||||
|
heartbeat/pgsql | 1 +
|
||||||
|
3 files changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/heartbeat/Filesystem
|
||||||
|
+++ b/heartbeat/Filesystem
|
||||||
|
@@ -2,7 +2,8 @@
|
||||||
|
#
|
||||||
|
# Support: linux-ha@lists.linux-ha.org
|
||||||
|
# License: GNU General Public License (GPL)
|
||||||
|
-#
|
||||||
|
+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved.
|
||||||
|
+#
|
||||||
|
# Filesystem
|
||||||
|
# Description: Manages a Filesystem on a shared storage medium.
|
||||||
|
# Original Author: Eric Z. Ayers (eric.ayers@compgen.com)
|
||||||
|
--- a/heartbeat/LVM
|
||||||
|
+++ b/heartbeat/LVM
|
||||||
|
@@ -10,6 +10,7 @@
|
||||||
|
# Support: linux-ha@lists.linux-ha.org
|
||||||
|
# License: GNU General Public License (GPL)
|
||||||
|
# Copyright: (C) 2002 - 2005 International Business Machines, Inc.
|
||||||
|
+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This code significantly inspired by the LVM resource
|
||||||
|
# in FailSafe by Lars Marowsky-Bree
|
||||||
|
--- a/heartbeat/pgsql
|
||||||
|
+++ b/heartbeat/pgsql
|
||||||
|
@@ -9,6 +9,7 @@
|
||||||
|
#
|
||||||
|
# Copyright: 2006-2012 Serge Dubrouski <sergeyfd@gmail.com>
|
||||||
|
# and other Linux-HA contributors
|
||||||
|
+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved.
|
||||||
|
# License: GNU General Public License (GPL)
|
||||||
|
#
|
||||||
|
###############################################################################
|
@ -0,0 +1,15 @@
|
|||||||
|
Index: resource-agents-3.9.5/heartbeat/exportfs
|
||||||
|
===================================================================
|
||||||
|
--- resource-agents-3.9.5/heartbeat/exportfs 2013-02-07 07:17:42.000000000 -0500
|
||||||
|
+++ resource-agents-3.9.5/heartbeat/exportfs 2015-12-18 12:40:18.382930869 -0500
|
||||||
|
@@ -184,7 +184,9 @@
|
||||||
|
|
||||||
|
is_exported() {
|
||||||
|
local dir=$1
|
||||||
|
- local spec=$2
|
||||||
|
+ # Because clientspec contains square brackets when using IPv6, and the exports entry does not,
|
||||||
|
+ # it is necessary to remove the square brackets to compare them with each other.
|
||||||
|
+ local spec=$(echo $2|sed -r 's/(\[|\])//g')
|
||||||
|
exportfs |
|
||||||
|
sed -e '$! N; s/\n[[:space:]]\+/ /; t; s/[[:space:]]\+\([^[:space:]]\+\)\(\n\|$\)/ \1\2/g; P;D;' |
|
||||||
|
grep -q -x -F "$dir $spec"
|
@ -0,0 +1,193 @@
|
|||||||
|
---
|
||||||
|
heartbeat/Filesystem | 59 ++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||||
|
heartbeat/LVM | 59 +++++++++++++++++++++++++++++++++++++++++++++++----
|
||||||
|
2 files changed, 111 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
--- a/heartbeat/Filesystem
|
||||||
|
+++ b/heartbeat/Filesystem
|
||||||
|
@@ -19,6 +19,7 @@
|
||||||
|
# OCF_RESKEY_run_fsck
|
||||||
|
# OCF_RESKEY_fast_stop
|
||||||
|
# OCF_RESKEY_force_clones
|
||||||
|
+# OCF_RESKEY_rmon_rsc_name
|
||||||
|
#
|
||||||
|
#OCF_RESKEY_device : name of block device for the filesystem. e.g. /dev/sda1, /dev/md0
|
||||||
|
# Or a -U or -L option for mount, or an NFS mount specification
|
||||||
|
@@ -30,6 +31,7 @@
|
||||||
|
#OCF_RESKEY_fast_stop : fast stop: yes(default)/no
|
||||||
|
#OCF_RESKEY_force_clones : allow running the resource as clone. e.g. local xfs mounts
|
||||||
|
# for each brick in a glusterfs setup
|
||||||
|
+#OCF_RESKEY_rmon_rsc_name: resource name to use when notifing RMON
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This assumes you want to manage a filesystem on a shared (SCSI) bus,
|
||||||
|
@@ -1053,20 +1055,65 @@ if [ "$OP" != "monitor" ]; then
|
||||||
|
ocf_log info "Running $OP for $DEVICE on $MOUNTPOINT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
+RMON_NOTIFY="/usr/local/bin/rmon_resource_notify"
|
||||||
|
+
|
||||||
|
+rmon_notify() {
|
||||||
|
+ local RSC_STATE=$1 TIMEOUT=$2
|
||||||
|
+
|
||||||
|
+ if [ -z "OCF_RESKEY_rmon_rsc_name" ]
|
||||||
|
+ then
|
||||||
|
+ ocf_log err "No RMON resource name given for $OCF_RESKEY_directory"
|
||||||
|
+ return
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ if [[ -x $RMON_NOTIFY ]]
|
||||||
|
+ then
|
||||||
|
+ $RMON_NOTIFY --resource-name $OCF_RESKEY_rmon_rsc_name \
|
||||||
|
+ --resource-state $RSC_STATE \
|
||||||
|
+ --resource-type mount \
|
||||||
|
+ --device $OCF_RESKEY_device \
|
||||||
|
+ --mount-point $OCF_RESKEY_directory \
|
||||||
|
+ --timeout $TIMEOUT \
|
||||||
|
+ >/dev/null 2>&1
|
||||||
|
+ else
|
||||||
|
+ ocf_log err "$RMON_NOTIFY not available, failed to execute: \
|
||||||
|
+$RMON_NOTIFY --resource-name $OCF_RESKEY_rmon_rsc_name \
|
||||||
|
+--resource-state $RSC_STATE --resource-type mount \
|
||||||
|
+--device $OCF_RESKEY_device --mount-point $OCF_RESKEY_directory \
|
||||||
|
+--timeout $TIMEOUT"
|
||||||
|
+ fi
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
# These operations do not require the clone checking + OCFS2
|
||||||
|
# initialization.
|
||||||
|
case $OP in
|
||||||
|
status) Filesystem_status
|
||||||
|
- exit $?
|
||||||
|
+ rc=$?
|
||||||
|
+ if [ $rc -eq $OCF_SUCCESS ]
|
||||||
|
+ then
|
||||||
|
+ rmon_notify "enabled" 300
|
||||||
|
+ else
|
||||||
|
+ rmon_notify "disabled" 300
|
||||||
|
+ fi
|
||||||
|
+ exit $rc
|
||||||
|
;;
|
||||||
|
monitor) Filesystem_monitor
|
||||||
|
- exit $?
|
||||||
|
+ rc=$?
|
||||||
|
+ if [ $rc -eq $OCF_SUCCESS ]
|
||||||
|
+ then
|
||||||
|
+ rmon_notify "enabled" 300
|
||||||
|
+ else
|
||||||
|
+ rmon_notify "disabled" 300
|
||||||
|
+ fi
|
||||||
|
+ exit $rc
|
||||||
|
;;
|
||||||
|
validate-all) Filesystem_validate_all
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
stop) Filesystem_stop
|
||||||
|
- exit $?
|
||||||
|
+ rc=$?
|
||||||
|
+ rmon_notify "disabled" 300
|
||||||
|
+ exit $rc
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
@@ -1114,6 +1161,12 @@ fi
|
||||||
|
|
||||||
|
case $OP in
|
||||||
|
start) Filesystem_start
|
||||||
|
+ rc=$?
|
||||||
|
+ if [ $rc -eq $OCF_SUCCESS ]
|
||||||
|
+ then
|
||||||
|
+ rmon_notify "enabled" 300
|
||||||
|
+ fi
|
||||||
|
+ exit $rc
|
||||||
|
;;
|
||||||
|
notify) Filesystem_notify
|
||||||
|
;;
|
||||||
|
--- a/heartbeat/LVM
|
||||||
|
+++ b/heartbeat/LVM
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
#
|
||||||
|
# OCF parameters are as below:
|
||||||
|
# OCF_RESKEY_volgrpname
|
||||||
|
+# OCF_RESKEY_rmon_rsc_name
|
||||||
|
#
|
||||||
|
#######################################################################
|
||||||
|
# Initialization:
|
||||||
|
@@ -311,6 +312,35 @@ then
|
||||||
|
exit $OCF_ERR_CONFIGURED
|
||||||
|
fi
|
||||||
|
|
||||||
|
+RMON_NOTIFY="/usr/local/bin/rmon_resource_notify"
|
||||||
|
+
|
||||||
|
+rmon_notify() {
|
||||||
|
+ local RSC_STATE=$1 TIMEOUT=$2
|
||||||
|
+
|
||||||
|
+ if [ -z "OCF_RESKEY_rmon_rsc_name" ]
|
||||||
|
+ then
|
||||||
|
+ ocf_log err "No RMON resource name given for $OCF_RESKEY_volgrpname"
|
||||||
|
+ return
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ if [[ -x $RMON_NOTIFY ]]
|
||||||
|
+ then
|
||||||
|
+ $RMON_NOTIFY --resource-name $OCF_RESKEY_rmon_rsc_name \
|
||||||
|
+ --resource-state $RSC_STATE \
|
||||||
|
+ --resource-type lvg \
|
||||||
|
+ --volume-group $OCF_RESKEY_volgrpname \
|
||||||
|
+ --timeout $TIMEOUT \
|
||||||
|
+ >/dev/null 2>&1
|
||||||
|
+ else
|
||||||
|
+ ocf_log err "$RMON_NOTIFY not available, failed to execute: \
|
||||||
|
+$RMON_NOTIFY --resource-name $OCF_RESKEY_rmon_rsc_name \
|
||||||
|
+--resource-state $RSC_STATE --resource-type lvg \
|
||||||
|
+--volume-group $OCF_RESKEY_volgrpname \
|
||||||
|
+--timeout $TIMEOUT"
|
||||||
|
+ fi
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
# Get the LVM version number, for this to work we assume(thanks to panjiam):
|
||||||
|
#
|
||||||
|
# LVM1 outputs like this
|
||||||
|
@@ -345,16 +375,37 @@ OP_METHOD=$1
|
||||||
|
case "$1" in
|
||||||
|
|
||||||
|
start) LVM_start $VOLUME
|
||||||
|
- exit $?;;
|
||||||
|
+ rc=$?
|
||||||
|
+ if [ $rc -eq $OCF_SUCCESS ]
|
||||||
|
+ then
|
||||||
|
+ rmon_notify "enabled" 300
|
||||||
|
+ fi
|
||||||
|
+ exit $rc;;
|
||||||
|
|
||||||
|
stop) LVM_stop $VOLUME
|
||||||
|
- exit $?;;
|
||||||
|
+ rc=$?
|
||||||
|
+ rmon_notify "disabled" 300
|
||||||
|
+ exit $rc;;
|
||||||
|
|
||||||
|
status) LVM_status $VOLUME $1
|
||||||
|
- exit $?;;
|
||||||
|
+ rc=$?
|
||||||
|
+ if [ $rc -eq $OCF_SUCCESS ]
|
||||||
|
+ then
|
||||||
|
+ rmon_notify "enabled" 300
|
||||||
|
+ else
|
||||||
|
+ rmon_notify "disabled" 300
|
||||||
|
+ fi
|
||||||
|
+ exit $rc;;
|
||||||
|
|
||||||
|
monitor) LVM_monitor $VOLUME
|
||||||
|
- exit $?;;
|
||||||
|
+ rc=$?
|
||||||
|
+ if [ $rc -eq $OCF_SUCCESS ]
|
||||||
|
+ then
|
||||||
|
+ rmon_notify "enabled" 300
|
||||||
|
+ else
|
||||||
|
+ rmon_notify "disabled" 300
|
||||||
|
+ fi
|
||||||
|
+ exit $rc;;
|
||||||
|
|
||||||
|
validate-all) LVM_validate_all
|
||||||
|
;;
|
@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
heartbeat/IPaddr2 | 10 +++++++++-
|
||||||
|
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/heartbeat/IPaddr2
|
||||||
|
+++ b/heartbeat/IPaddr2
|
||||||
|
@@ -13,6 +13,7 @@
|
||||||
|
# Copyright (c) 2003 Tuomo Soini
|
||||||
|
# Copyright (c) 2004-2006 SUSE LINUX AG, Lars Marowsky-Brée
|
||||||
|
# All Rights Reserved.
|
||||||
|
+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of version 2 of the GNU General Public License as
|
||||||
|
@@ -50,6 +51,7 @@
|
||||||
|
# OCF_RESKEY_nic
|
||||||
|
# OCF_RESKEY_cidr_netmask
|
||||||
|
# OCF_RESKEY_iflabel
|
||||||
|
+# OCF_RESKEY_if_type
|
||||||
|
# OCF_RESKEY_mac
|
||||||
|
# OCF_RESKEY_clusterip_hash
|
||||||
|
# OCF_RESKEY_arp_interval
|
||||||
|
@@ -314,7 +316,13 @@ ip_init() {
|
||||||
|
|
||||||
|
BASEIP="$OCF_RESKEY_ip"
|
||||||
|
BRDCAST="$OCF_RESKEY_broadcast"
|
||||||
|
- NIC="$OCF_RESKEY_nic"
|
||||||
|
+ IFTYPE="$OCF_RESKEY_if_type"
|
||||||
|
+ if [ -n "${IFTYPE}" ]
|
||||||
|
+ then
|
||||||
|
+ NIC=`grep ${IFTYPE}= /etc/platform/platform.conf | cut -f2 -d '='`
|
||||||
|
+ else
|
||||||
|
+ NIC="$OCF_RESKEY_nic"
|
||||||
|
+ fi
|
||||||
|
# Note: We had a version out there for a while which used
|
||||||
|
# netmask instead of cidr_netmask. Don't remove this aliasing code!
|
||||||
|
if
|
@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
heartbeat/IPaddr2 | 21 ++++++++++++++++++---
|
||||||
|
1 file changed, 18 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
--- a/heartbeat/IPaddr2
|
||||||
|
+++ b/heartbeat/IPaddr2
|
||||||
|
@@ -661,7 +661,12 @@ ip_start() {
|
||||||
|
local ip_status=`ip_served`
|
||||||
|
|
||||||
|
if [ "$ip_status" = "ok" ]; then
|
||||||
|
- exit $OCF_SUCCESS
|
||||||
|
+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ]
|
||||||
|
+ then
|
||||||
|
+ exit $OCF_SUCCESS
|
||||||
|
+ else
|
||||||
|
+ exit $OCF_ERR_GENERIC
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$IP_CIP" ] && [ $ip_status = "no" ] || [ $ip_status = "partial2" ]; then
|
||||||
|
@@ -714,7 +719,12 @@ ip_start() {
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
- exit $OCF_SUCCESS
|
||||||
|
+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ]
|
||||||
|
+ then
|
||||||
|
+ exit $OCF_SUCCESS
|
||||||
|
+ else
|
||||||
|
+ exit $OCF_ERR_GENERIC
|
||||||
|
+ fi
|
||||||
|
}
|
||||||
|
|
||||||
|
ip_stop() {
|
||||||
|
@@ -788,7 +798,12 @@ ip_monitor() {
|
||||||
|
local ip_status=`ip_served`
|
||||||
|
case $ip_status in
|
||||||
|
ok)
|
||||||
|
- return $OCF_SUCCESS
|
||||||
|
+ if [ -n "`ip link show $NIC | grep \"state UP\"`" ]
|
||||||
|
+ then
|
||||||
|
+ return $OCF_SUCCESS
|
||||||
|
+ else
|
||||||
|
+ return $OCF_NOT_RUNNING
|
||||||
|
+ fi
|
||||||
|
;;
|
||||||
|
partial|no|partial2)
|
||||||
|
exit $OCF_NOT_RUNNING
|
@ -0,0 +1,155 @@
|
|||||||
|
commit 69217b67c0d018f129c7cbf526aebf0b236be701
|
||||||
|
Author: Chris Friesen <chris.friesen@windriver.com>
|
||||||
|
Date: Thu Sep 17 15:26:16 2015 -0400
|
||||||
|
|
||||||
|
CGCS-2553/CGTS-2534: tweak LVM success criteria
|
||||||
|
|
||||||
|
It turns out that activating an LVM LV which has a snapshot (or activating
|
||||||
|
the snapshot) will take an amount of time that is proportional to the
|
||||||
|
delta between the snapshot and the original volume.
|
||||||
|
|
||||||
|
Because of this it's possible that running "vgchange" could take a long
|
||||||
|
time, since it also activates the LVs.
|
||||||
|
|
||||||
|
If this happens, rather than timeout the whole script we want to log which
|
||||||
|
LVs/snapshots havn't yet been activated, and then just continue on.
|
||||||
|
Accordingly, we want to set the internal timeout in the "start" operation
|
||||||
|
to something less than the timeout for the "start" action.
|
||||||
|
|
||||||
|
There will be corresponding changes in cinder to properly handle this case.
|
||||||
|
|
||||||
|
diff --git a/heartbeat/LVM b/heartbeat/LVM
|
||||||
|
index bd1a47a..24b0244 100755
|
||||||
|
--- a/heartbeat/LVM
|
||||||
|
+++ b/heartbeat/LVM
|
||||||
|
@@ -186,6 +186,81 @@ LVM_monitor() {
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
+# Activate one volume explicitly.
|
||||||
|
+#
|
||||||
|
+activate_volume() {
|
||||||
|
+ ocf_run lvchange $1 /dev/${2}/$3
|
||||||
|
+ if [ $? -eq 0 ] ; then
|
||||||
|
+ ocf_log info "Succesfully activated $LV."
|
||||||
|
+ else
|
||||||
|
+ ocf_log err "Problem activating $LV."
|
||||||
|
+ fi
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#
|
||||||
|
+# Kick off parallel activation of all volumes
|
||||||
|
+#
|
||||||
|
+activate_all_volumes() {
|
||||||
|
+ VG=$1
|
||||||
|
+ shift
|
||||||
|
+ lvchange_args="$*"
|
||||||
|
+
|
||||||
|
+ # Get the list of volumes, without the first line which is column headings.
|
||||||
|
+ VOLS=`lvs $VG |tail -n +2`
|
||||||
|
+
|
||||||
|
+ while read -r LINE; do
|
||||||
|
+ # Convert the line into an array.
|
||||||
|
+ LINE_ARRAY=($LINE)
|
||||||
|
+
|
||||||
|
+ # First array element is the volume/snapshot name.
|
||||||
|
+ LV=${LINE_ARRAY[0]}
|
||||||
|
+
|
||||||
|
+ # Third array element is the attributes.
|
||||||
|
+ ATTR=${LINE_ARRAY[2]}
|
||||||
|
+
|
||||||
|
+ # Fifth character in the attributes is "a" if it's active.
|
||||||
|
+ ACTIVE=${ATTR:4:1}
|
||||||
|
+ if [ "$ACTIVE" == "a" ]; then
|
||||||
|
+ ocf_log info "$LV is already active."
|
||||||
|
+ continue
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ SNAPSHOT_ORIGIN=${LINE_ARRAY[4]}
|
||||||
|
+ if [ "$SNAPSHOT_ORIGIN" != "" ] ; then
|
||||||
|
+ # If this is a snapshot, don't activate it.
|
||||||
|
+ continue
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ ( activate_volume "$*" $VG $LV ) &
|
||||||
|
+ done <<< "$VOLS"
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#
|
||||||
|
+# Scan for inactive volumes and log any that are found.
|
||||||
|
+#
|
||||||
|
+log_inactive_volumes() {
|
||||||
|
+ # Get the list of volumes, without the first line which is column headings.
|
||||||
|
+ VOLS=`lvs $1 |tail -n +2`
|
||||||
|
+
|
||||||
|
+ while read -r LINE; do
|
||||||
|
+ # Convert the line into an array.
|
||||||
|
+ LINE_ARRAY=($LINE)
|
||||||
|
+
|
||||||
|
+ # First array element is the volume/snapshot name.
|
||||||
|
+ LV=${LINE_ARRAY[0]}
|
||||||
|
+
|
||||||
|
+ # Third array element is the attributes.
|
||||||
|
+ ATTR=${LINE_ARRAY[2]}
|
||||||
|
+
|
||||||
|
+ # Fifth character in the attributes is "a" if it's active.
|
||||||
|
+ ACTIVE=${ATTR:4:1}
|
||||||
|
+ if [ "$ACTIVE" != "a" ]; then
|
||||||
|
+ ocf_log err "Volume $LV is not active after expiry of timeout."
|
||||||
|
+ fi
|
||||||
|
+ done <<< "$VOLS"
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#
|
||||||
|
# Enable LVM volume
|
||||||
|
#
|
||||||
|
LVM_start() {
|
||||||
|
@@ -218,7 +293,47 @@ LVM_start() {
|
||||||
|
vgchange_options="$vgchange_options --monitor y"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- ocf_run vgchange $vgchange_options $1 || return $OCF_ERR_GENERIC
|
||||||
|
+ # Kick off activation of all volumes. If it doesn't complete within
|
||||||
|
+ # the timeout period, then we'll log the not-yet-activated volumes and
|
||||||
|
+ # continue on.
|
||||||
|
+ (ocf_run vgchange $vgchange_options $1) & PID=$!
|
||||||
|
+
|
||||||
|
+ # Check every second for up to TIMEOUT seconds whether the vgchange has
|
||||||
|
+ # completed.
|
||||||
|
+ TIMEOUT=300
|
||||||
|
+ TIMED_OUT=true
|
||||||
|
+ SECONDS=0;
|
||||||
|
+ PARALLEL_ACTIVATE_DELAY=10
|
||||||
|
+ PARALLEL_ACTIVATE_DONE=false
|
||||||
|
+ while [ $SECONDS -lt $TIMEOUT ] ; do
|
||||||
|
+ kill -0 $PID &> /dev/null
|
||||||
|
+ if [ $? -eq 1 ] ; then
|
||||||
|
+ # process with pid of $PID doesn't exist, vgchange command completed
|
||||||
|
+ TIMED_OUT=false
|
||||||
|
+ break
|
||||||
|
+ fi
|
||||||
|
+ if [ $SECONDS -ge $PARALLEL_ACTIVATE_DELAY ] && \
|
||||||
|
+ [ "$PARALLEL_ACTIVATE_DONE" != true ] && \
|
||||||
|
+ [ "$1" == "cinder-volumes" ] ; then
|
||||||
|
+ # This will kick off parallel activation of all LVs in the VG.
|
||||||
|
+ # The delay is to ensure the VG is activated first.
|
||||||
|
+ PARALLEL_ACTIVATE_DONE=true
|
||||||
|
+ ocf_log info Explicitly activating all volumes in $1 with: $vgchange_options
|
||||||
|
+ activate_all_volumes $1 $vgchange_options
|
||||||
|
+ fi
|
||||||
|
+ sleep 1
|
||||||
|
+ done
|
||||||
|
+
|
||||||
|
+ if [ "$TIMED_OUT" = true ] ; then
|
||||||
|
+ ocf_log err "Timed out running ocf_run vgchange $vgchange_options $1"
|
||||||
|
+ log_inactive_volumes $1
|
||||||
|
+ else
|
||||||
|
+ # Child process completed, get its status.
|
||||||
|
+ wait $PID
|
||||||
|
+ if [ $? -ne 0 ] ; then
|
||||||
|
+ return $OCF_ERR_GENERIC
|
||||||
|
+ fi
|
||||||
|
+ fi
|
||||||
|
|
||||||
|
if LVM_status $1; then
|
||||||
|
: OK Volume $1 activated just fine!
|
@ -0,0 +1,52 @@
|
|||||||
|
---
|
||||||
|
heartbeat/ocf-returncodes | 35 +++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 35 insertions(+)
|
||||||
|
|
||||||
|
--- a/heartbeat/ocf-returncodes
|
||||||
|
+++ b/heartbeat/ocf-returncodes
|
||||||
|
@@ -5,6 +5,7 @@
|
||||||
|
# Copyright (c) 2004 SUSE LINUX AG, Andrew Beekhof
|
||||||
|
# All Rights Reserved.
|
||||||
|
#
|
||||||
|
+# Copyright (c) 2014 Wind River Systems, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
@@ -53,3 +54,37 @@ OCF_NOT_RUNNING=7
|
||||||
|
#
|
||||||
|
OCF_RUNNING_MASTER=8
|
||||||
|
OCF_FAILED_MASTER=9
|
||||||
|
+
|
||||||
|
+# Non-standard values particular to Wind River deployments.
|
||||||
|
+#
|
||||||
|
+# OCF does not include the concept of data sync states for master/slave
|
||||||
|
+# resources.
|
||||||
|
+#
|
||||||
|
+# OCF_DATA_INCONSISTENT:
|
||||||
|
+# The resource's data is not useable.
|
||||||
|
+#
|
||||||
|
+# OCF_DATA_OUTDATED:
|
||||||
|
+# The resource's data is consistent, but a peer with more recent data
|
||||||
|
+# has been seen.
|
||||||
|
+#
|
||||||
|
+# OCF_DATA_CONSISTENT:
|
||||||
|
+# The resource's data is consistent, but it is unsure that this is the
|
||||||
|
+# most recent data.
|
||||||
|
+#
|
||||||
|
+# OCF_SYNC:
|
||||||
|
+# The resource is syncing data.
|
||||||
|
+#
|
||||||
|
+# OCF_STANDALONE:
|
||||||
|
+# The resource is operating as standalone. No peer is available or
|
||||||
|
+# syncing is not possible (i.e. split brain fencing).
|
||||||
|
+#
|
||||||
|
+OCF_DATA_INCONSISTENT=32
|
||||||
|
+OCF_DATA_OUTDATED=33
|
||||||
|
+OCF_DATA_CONSISTENT=34
|
||||||
|
+OCF_DATA_SYNC=35
|
||||||
|
+OCF_DATA_STANDALONE=36
|
||||||
|
+OCF_RUNNING_MASTER_DATA_INCONSISTENT=37
|
||||||
|
+OCF_RUNNING_MASTER_DATA_OUTDATED=38
|
||||||
|
+OCF_RUNNING_MASTER_DATA_CONSISTENT=39
|
||||||
|
+OCF_RUNNING_MASTER_DATA_SYNC=40
|
||||||
|
+OCF_RUNNING_MASTER_DATA_STANDALONE=41
|
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
heartbeat/ocf-shellfuncs.in | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/heartbeat/ocf-shellfuncs.in
|
||||||
|
+++ b/heartbeat/ocf-shellfuncs.in
|
||||||
|
@@ -174,9 +174,9 @@ hadate() {
|
||||||
|
set_logtag() {
|
||||||
|
if [ -z "$HA_LOGTAG" ]; then
|
||||||
|
if [ -n "$OCF_RESOURCE_INSTANCE" ]; then
|
||||||
|
- HA_LOGTAG="$__SCRIPT_NAME($OCF_RESOURCE_INSTANCE)[$$]"
|
||||||
|
+ HA_LOGTAG="OCF_$__SCRIPT_NAME($OCF_RESOURCE_INSTANCE)[$$]"
|
||||||
|
else
|
||||||
|
- HA_LOGTAG="$__SCRIPT_NAME[$$]"
|
||||||
|
+ HA_LOGTAG="OCF_$__SCRIPT_NAME[$$]"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
Index: resource-agents-3.9.5/heartbeat/pgsql
|
||||||
|
===================================================================
|
||||||
|
--- resource-agents-3.9.5.orig/heartbeat/pgsql
|
||||||
|
+++ resource-agents-3.9.5/heartbeat/pgsql
|
||||||
|
@@ -38,6 +38,7 @@ get_pgsql_param() {
|
||||||
|
OCF_RESKEY_pgctl_default=/usr/bin/pg_ctl
|
||||||
|
OCF_RESKEY_psql_default=/usr/bin/psql
|
||||||
|
OCF_RESKEY_pgdata_default=/var/lib/pgsql/data
|
||||||
|
+OCF_RESKEY_pgconf_default=/etc/postgresql
|
||||||
|
OCF_RESKEY_pgdba_default=postgres
|
||||||
|
OCF_RESKEY_pghost_default=""
|
||||||
|
OCF_RESKEY_pgport_default=5432
|
||||||
|
@@ -67,10 +68,11 @@ OCF_RESKEY_stop_escalate_in_slave_defaul
|
||||||
|
: ${OCF_RESKEY_pgctl=${OCF_RESKEY_pgctl_default}}
|
||||||
|
: ${OCF_RESKEY_psql=${OCF_RESKEY_psql_default}}
|
||||||
|
: ${OCF_RESKEY_pgdata=${OCF_RESKEY_pgdata_default}}
|
||||||
|
+: ${OCF_RESKEY_pgconf=${OCF_RESKEY_pgconf_default}}
|
||||||
|
: ${OCF_RESKEY_pgdba=${OCF_RESKEY_pgdba_default}}
|
||||||
|
: ${OCF_RESKEY_pghost=${OCF_RESKEY_pghost_default}}
|
||||||
|
: ${OCF_RESKEY_pgport=${OCF_RESKEY_pgport_default}}
|
||||||
|
-: ${OCF_RESKEY_config=${OCF_RESKEY_pgdata}/postgresql.conf}
|
||||||
|
+: ${OCF_RESKEY_config=${OCF_RESKEY_pgconf}/postgresql.conf}
|
||||||
|
: ${OCF_RESKEY_start_opt=${OCF_RESKEY_start_opt_default}}
|
||||||
|
: ${OCF_RESKEY_pgdb=${OCF_RESKEY_pgdb_default}}
|
||||||
|
: ${OCF_RESKEY_logfile=${OCF_RESKEY_logfile_default}}
|
||||||
|
@@ -166,6 +168,14 @@ Path to PostgreSQL data directory.
|
||||||
|
<content type="string" default="${OCF_RESKEY_pgdata_default}" />
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
+<parameter name="pgconf" unique="0" required="0">
|
||||||
|
+<longdesc lang="en">
|
||||||
|
+Path to PostgreSQL config directory.
|
||||||
|
+</longdesc>
|
||||||
|
+<shortdesc lang="en">pgconf</shortdesc>
|
||||||
|
+<content type="string" default="${OCF_RESKEY_pgconf_default}" />
|
||||||
|
+</parameter>
|
||||||
|
+
|
||||||
|
<parameter name="pgdba" unique="0" required="0">
|
||||||
|
<longdesc lang="en">
|
||||||
|
User that owns PostgreSQL.
|
||||||
|
@@ -220,7 +230,7 @@ SQL script that will be used for monitor
|
||||||
|
Path to the PostgreSQL configuration file for the instance.
|
||||||
|
</longdesc>
|
||||||
|
<shortdesc lang="en">Configuration file</shortdesc>
|
||||||
|
-<content type="string" default="${OCF_RESKEY_pgdata}/postgresql.conf" />
|
||||||
|
+<content type="string" default="${OCF_RESKEY_pgconf}/postgresql.conf" />
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
<parameter name="pgdb" unique="0" required="0">
|
||||||
|
@@ -475,6 +485,12 @@ pgsql_real_start() {
|
||||||
|
local postgres_options
|
||||||
|
local rc
|
||||||
|
|
||||||
|
+ # WRS: Create an unversioned symlink under /var/run so SM can easily
|
||||||
|
+ # find the PID file.
|
||||||
|
+ if [ ! -h $PIDFILE_SYMLINK ]; then
|
||||||
|
+ /bin/ln -s $PIDFILE $PIDFILE_SYMLINK
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
if pgsql_status; then
|
||||||
|
ocf_log info "PostgreSQL is already running. PID=`cat $PIDFILE`"
|
||||||
|
if is_replication; then
|
||||||
|
@@ -1717,12 +1733,12 @@ then
|
||||||
|
exit $OCF_ERR_GENERIC
|
||||||
|
fi
|
||||||
|
|
||||||
|
-
|
||||||
|
PIDFILE=${OCF_RESKEY_pgdata}/postmaster.pid
|
||||||
|
+PIDFILE_SYMLINK=/var/run/postmaster.pid
|
||||||
|
BACKUPLABEL=${OCF_RESKEY_pgdata}/backup_label
|
||||||
|
RESOURCE_NAME=`echo $OCF_RESOURCE_INSTANCE | cut -d ":" -f 1`
|
||||||
|
PGSQL_WAL_RECEIVER_STATUS_ATTR="${RESOURCE_NAME}-receiver-status"
|
||||||
|
-RECOVERY_CONF=${OCF_RESKEY_pgdata}/recovery.conf
|
||||||
|
+RECOVERY_CONF=${OCF_RESKEY_pgconf}/recovery.conf
|
||||||
|
NODENAME=`uname -n | tr '[A-Z]' '[a-z]'`
|
||||||
|
|
||||||
|
if is_replication; then
|
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
heartbeat/Filesystem | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
--- a/heartbeat/Filesystem
|
||||||
|
+++ b/heartbeat/Filesystem
|
||||||
|
@@ -727,6 +727,10 @@ signal_processes() {
|
||||||
|
}
|
||||||
|
try_umount() {
|
||||||
|
local SUB=$1
|
||||||
|
+
|
||||||
|
+ # We need to ensure we umount in namespaces, too
|
||||||
|
+ /usr/sbin/umount-in-namespace $SUB
|
||||||
|
+
|
||||||
|
$UMOUNT $umount_force $SUB
|
||||||
|
list_mounts | grep -q " $SUB " >/dev/null 2>&1 || {
|
||||||
|
ocf_log info "unmounted $SUB successfully"
|
@ -128,3 +128,4 @@ kernel/kernel-modules/drbd
|
|||||||
base/rpm
|
base/rpm
|
||||||
base/dpkg
|
base/dpkg
|
||||||
base/cgcs-users
|
base/cgcs-users
|
||||||
|
base/cluster-resource-agents
|
||||||
|
Loading…
x
Reference in New Issue
Block a user