diff --git a/SOURCES/bz1751949-1-SAPInstance-add-reload-action.patch b/SOURCES/bz1751949-1-SAPInstance-add-reload-action.patch new file mode 100644 index 0000000..9f036c0 --- /dev/null +++ b/SOURCES/bz1751949-1-SAPInstance-add-reload-action.patch @@ -0,0 +1,92 @@ +From 70a28e8130be863a9073b0a80e0511e971e205c4 Mon Sep 17 00:00:00 2001 +From: Fabian Herschel +Date: Fri, 27 Jul 2018 12:33:19 +0200 +Subject: [PATCH 1/2] SAPInstance: implemeted reload method The reload method + is needed to avoid resource restarts after a non-unique parameter has been + changed. This is in special for interest of the MONITOR_SERVICES parameter. + +--- + heartbeat/SAPInstance | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/heartbeat/SAPInstance b/heartbeat/SAPInstance +index 8de7cee8c..c25839f0c 100755 +--- a/heartbeat/SAPInstance ++++ b/heartbeat/SAPInstance +@@ -61,6 +61,7 @@ sapinstance_usage() { + The 'monitor' operation reports whether the instance seems to be working + The 'promote' operation starts the primary instance in a Master/Slave configuration + The 'demote' operation stops the primary instance and starts the ERS instance ++ The 'reload' operation allows changed parameters (non-unique only) without restarting the service + The 'notify' operation always returns SUCCESS + The 'validate-all' operation reports whether the parameters are valid + The 'methods' operation reports on the methods $0 supports +@@ -224,6 +225,7 @@ The name of the SAP START profile. Specify this parameter, if you have changed t + + + ++ + + + +@@ -244,6 +246,7 @@ sapinstance_methods() { + monitor + promote + demote ++ reload + notify + validate-all + methods +@@ -965,6 +968,9 @@ case "$ACTION" in + exit $?;; + validate-all) sapinstance_validate + exit $?;; ++ reload ) ++ ocf_log info "reloading SAPInstance parameters" ++ exit $OCF_SUCCESS;; + *) sapinstance_methods + exit $OCF_ERR_UNIMPLEMENTED;; + esac + +From ee529b088cc1111656e94dea56b9fcfa6d813313 Mon Sep 17 00:00:00 2001 +From: Fabian Herschel +Date: Fri, 27 Jul 2018 13:02:39 +0200 +Subject: [PATCH 2/2] SAPInstance: Improved indents + +--- + heartbeat/SAPInstance | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/heartbeat/SAPInstance b/heartbeat/SAPInstance +index c25839f0c..174ea36ef 100755 +--- a/heartbeat/SAPInstance ++++ b/heartbeat/SAPInstance +@@ -61,7 +61,7 @@ sapinstance_usage() { + The 'monitor' operation reports whether the instance seems to be working + The 'promote' operation starts the primary instance in a Master/Slave configuration + The 'demote' operation stops the primary instance and starts the ERS instance +- The 'reload' operation allows changed parameters (non-unique only) without restarting the service ++ The 'reload' operation allows changed parameters (non-unique only) without restarting the service + The 'notify' operation always returns SUCCESS + The 'validate-all' operation reports whether the parameters are valid + The 'methods' operation reports on the methods $0 supports +@@ -246,7 +246,7 @@ sapinstance_methods() { + monitor + promote + demote +- reload ++ reload + notify + validate-all + methods +@@ -969,8 +969,8 @@ case "$ACTION" in + validate-all) sapinstance_validate + exit $?;; + reload ) +- ocf_log info "reloading SAPInstance parameters" +- exit $OCF_SUCCESS;; ++ ocf_log info "reloading SAPInstance parameters" ++ exit $OCF_SUCCESS;; + *) sapinstance_methods + exit $OCF_ERR_UNIMPLEMENTED;; + esac diff --git a/SOURCES/bz1751949-2-SAPInstance-improve-profile-detection.patch b/SOURCES/bz1751949-2-SAPInstance-improve-profile-detection.patch new file mode 100644 index 0000000..e21e2da --- /dev/null +++ b/SOURCES/bz1751949-2-SAPInstance-improve-profile-detection.patch @@ -0,0 +1,26 @@ +From 8eda4725a946ca669df035ed0ffdf053a65e1258 Mon Sep 17 00:00:00 2001 +From: Fabian Herschel +Date: Thu, 2 Aug 2018 15:36:31 +0200 +Subject: [PATCH] SAPInstance: Improved SAP instance profile detection + +--- + heartbeat/SAPInstance | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/heartbeat/SAPInstance b/heartbeat/SAPInstance +index 174ea36ef..eb058cccf 100755 +--- a/heartbeat/SAPInstance ++++ b/heartbeat/SAPInstance +@@ -371,7 +371,11 @@ sapinstance_init() { + + if [ -z "$currentSTART_PROFILE" ] + then +- SAPSTARTPROFILE="$DIR_PROFILE/START_${InstanceName}_${SAPVIRHOST}" ++ if [ ! -r "$DIR_PROFILE/START_${InstanceName}_${SAPVIRHOST}" -a -r "$DIR_PROFILE/${SID}_${InstanceName}_${SAPVIRHOST}" ]; then ++ SAPSTARTPROFILE="$DIR_PROFILE/${SID}_${InstanceName}_${SAPVIRHOST}" ++ else ++ SAPSTARTPROFILE="$DIR_PROFILE/START_${InstanceName}_${SAPVIRHOST}" ++ fi + else + SAPSTARTPROFILE="$currentSTART_PROFILE" + fi diff --git a/SOURCES/bz1751949-3-SAPInstance-metadata-improvements.patch b/SOURCES/bz1751949-3-SAPInstance-metadata-improvements.patch new file mode 100644 index 0000000..7421431 --- /dev/null +++ b/SOURCES/bz1751949-3-SAPInstance-metadata-improvements.patch @@ -0,0 +1,37 @@ +--- a/heartbeat/SAPInstance 2019-02-20 12:42:55.655819263 +0100 ++++ b/heartbeat/SAPInstance 2019-02-08 10:57:02.281048136 +0100 +@@ -159,14 +159,14 @@ + + + +- Usual a SAP Instance is stopped by the command 'sapcontrol -nr InstanceNr -function Stop'. SHUTDOWN_METHOD=KILL means to kill the SAP Instance using OS commands. SAP processes of the instance are terminated with 'kill -9', shared memory is deleted with 'cleanipc' and the 'kill.sap' file will be deleted. That method is much faster than the gracefull stop, but the instance does not have the chance to say goodbye to other SAPinstances in the same system. USE AT YOUR OWN RISK !! ++ Usually a SAP Instance is stopped by the command 'sapcontrol -nr InstanceNr -function Stop'. SHUTDOWN_METHOD=KILL means to kill the SAP Instance using OS commands. SAP processes of the instance are terminated with 'kill -9', shared memory is deleted with 'cleanipc' and the 'kill.sap' file will be deleted. That method is much faster than the graceful stop, but the instance does not have the chance to say goodbye to other SAPinstances in the same system. USE AT YOUR OWN RISK !! + Shutdown graceful or kill a SAP instance by terminating the processes. (normal|KILL) + + + + Only used in a Master/Slave resource configuration: + The full qualified SAP enqueue replication instance name. e.g. P01_ERS02_sapp01ers. Usually this is the name of the SAP instance profile. +-The enqueue replication instance must be installed, before you want to configure a master-slave cluster recource. ++The enqueue replication instance must be installed, before you want to configure a master-slave cluster resource. + + The master-slave configuration in the cluster must use this properties: + clone_max = 2 +@@ -209,7 +209,7 @@ + Only used for ASCS/ERS SAP Netweaver installations without implementing a master/slave resource to + allow the ASCS to 'find' the ERS running on another cluster node after a resource failure. This parameter should be set + to true 'only' for the ERS instance for implementations following the SAP NetWeaver 7.40 HA certification (NW-HA-CLU-740). This includes also +- systems for NetWeaver less than 7.40, if you like to impelemnt the NW-HA-CLU-740 scenario. ++ systems for NetWeaver less than 7.40, if you like to implement the NW-HA-CLU-740 scenario. + + Mark SAPInstance as ERS instance + +@@ -225,7 +225,7 @@ + + + +- ++ + + + diff --git a/SPECS/resource-agents-sap.spec b/SPECS/resource-agents-sap.spec index 2726978..0e932e4 100644 --- a/SPECS/resource-agents-sap.spec +++ b/SPECS/resource-agents-sap.spec @@ -28,7 +28,7 @@ Name: resource-agents-sap Summary: SAP cluster resource agents Version: 4.1.1 -Release: 28%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +Release: 29%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: GPLv2+ URL: https://github.com/ClusterLabs/resource-agents %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} @@ -38,6 +38,9 @@ Group: Productivity/Clustering/HA %endif Source0: %{upstream_prefix}-%{upstream_version}.tar.gz Source1: %{sap_script_prefix}-%{sap_script_hash}.tar.gz +Patch0: bz1751949-1-SAPInstance-add-reload-action.patch +Patch1: bz1751949-2-SAPInstance-improve-profile-detection.patch +Patch2: bz1751949-3-SAPInstance-metadata-improvements.patch BuildArch: noarch @@ -59,7 +62,10 @@ SAP instances to be managed in a cluster environment. %prep %setup -q -n %{upstream_prefix}-%{upstream_version} -%setup -T -D -a 1 -n %{upstream_prefix}-%{upstream_version} +%setup -q -T -D -a 1 -n %{upstream_prefix}-%{upstream_version} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build if [ ! -f configure ]; then @@ -124,6 +130,11 @@ rm -rf %{buildroot} %exclude /usr/src %changelog +* Thu Jan 23 2020 Oyvind Albrigtsen - 4.1.1-29 +- SAPInstance: add reload-action + + Resolves: rhbz#1751949 + * Tue Jun 18 2019 Oyvind Albrigtsen - 4.1.1-28 - Initial build as separate package