diff --git a/SOURCES/RHEL-59660-fix-SAPHanaTopology-regression.patch b/SOURCES/RHEL-59660-fix-SAPHanaTopology-regression.patch new file mode 100644 index 0000000..d8849ff --- /dev/null +++ b/SOURCES/RHEL-59660-fix-SAPHanaTopology-regression.patch @@ -0,0 +1,43 @@ +From 6062afd4f2da3972e3469b2ab8491e3314296efe Mon Sep 17 00:00:00 2001 +From: AngelaBriel +Date: Thu, 22 Feb 2024 15:38:11 +0100 +Subject: [PATCH] fix regression in topology (bsc#1219785) + +--- + ra/SAPHanaTopology | 16 ---------------- + 1 file changed, 16 deletions(-) + +diff --git a/ra/SAPHanaTopology b/ra/SAPHanaTopology +index 5c4f6838..8630dd8c 100755 +--- a/ra/SAPHanaTopology ++++ b/ra/SAPHanaTopology +@@ -873,7 +873,6 @@ function sht_monitor() { + return $rc + } + +- + # + # function: sht_status - get status of a hana instance (os tools only) + # params: - +@@ -1004,21 +1003,6 @@ function sht_stop_clone() { + return $rc + } + +-# +-# function: sht_monitor +-# this function should never be called currently. +-# it is intended for future releases which might support un-cloned resources +-# for now it is only used to print a reasonable error message in case of +-# non-cloned resources instead of 'command not found' +-# +-function sht_monitor() { +- if ! is_clone; then +- super_ocf_log error "RA: resource is not defined as clone. This is not supported (OCF_ERR_UNIMPLEMENTED)" +- return "$OCF_ERR_UNIMPLEMENTED" +- else +- return "$OCF_SUCCESS" +- fi +-} + + # + # function: sht_monitor_clone - monitor a hana clone instance diff --git a/SPECS/resource-agents-sap-hana.spec b/SPECS/resource-agents-sap-hana.spec index 217ad21..f239429 100644 --- a/SPECS/resource-agents-sap-hana.spec +++ b/SPECS/resource-agents-sap-hana.spec @@ -45,22 +45,23 @@ %bcond_with rgmanager %bcond_without linuxha -Name: resource-agents-sap-hana -Summary: SAP HANA cluster resource agents -Epoch: 1 -Version: 0.162.3 -Release: 2%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} -License: GPLv2+ -URL: https://github.com/SUSE/SAPHanaSR -Source0: %{upstream_prefix}-%{upstream_version}.tar.gz -Source1: %{saphana_prefix}-%{saphana_version}.tar.gz +Name: resource-agents-sap-hana +Summary: SAP HANA cluster resource agents +Epoch: 1 +Version: 0.162.3 +Release: 5%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +License: GPLv2+ +URL: https://github.com/SUSE/SAPHanaSR +Source0: %{upstream_prefix}-%{upstream_version}.tar.gz +Source1: %{saphana_prefix}-%{saphana_version}.tar.gz -BuildArch: noarch +Patch0: RHEL-59660-fix-SAPHanaTopology-regression.patch + +BuildArch: noarch # Build dependencies BuildRequires: make BuildRequires: automake autoconf pkgconfig gcc -BuildRequires: perl-interpreter BuildRequires: libxslt glib2-devel BuildRequires: systemd BuildRequires: which @@ -84,11 +85,10 @@ BuildRequires: libglue-devel BuildRequires: libxslt docbook_4 docbook-xsl-stylesheets %endif -Requires: resource-agents >= 4.8.0 -Conflicts: %{name}-scaleout +Requires: resource-agents >= 4.8.0 +Conflicts: %{name}-scaleout Requires: /bin/bash /usr/bin/grep /bin/sed /bin/gawk -Requires: perl %description The SAP HANA resource agents interface with Pacemaker to allow @@ -98,10 +98,21 @@ SAP instances to be managed in a cluster environment. %setup -q -n %{upstream_prefix}-%{upstream_version} %setup -q -T -D -a 1 -n %{upstream_prefix}-%{upstream_version} +# Add patches before moving files +%patch -d %{saphana_prefix}-%{saphana_version} -p1 -P 0 + # add SAPHana agents to Makefile.am mv %{saphana_prefix}-%{saphana_version}/ra/SAPHana* heartbeat -sed -i -e '/ SAPInstance \\/a\ SAPHana \\\n SAPHanaTopology \\' heartbeat/Makefile.am -sed -i -e '/ ocf_heartbeat_SAPInstance.7 \\/a\ ocf_heartbeat_SAPHana.7 \\\n ocf_heartbeat_SAPHanaTopology.7 \\' doc/man/Makefile.am + +# Find the existing SAPInstance entry in the list and add 2 new after in corresponding formatting. +# heartbeat/Makefile.am indents by 3 tabs in the target list +sed -i -e 's/\(\t\tSAPInstance\t\t\\\)/\1\n\t\t\tSAPHana\t\t\t\\\n\t\t\tSAPHanaTopology\t\\/' heartbeat/Makefile.am + +# Find the existing SAPInstance entry in the list and add 2 new after in corresponding formatting. +# doc/man/Makefile.am indents by 26 spaces in the target list +sed -i -e 's/\( \{26\}ocf_heartbeat_SAPInstance.7 \\\)/\1\n'\ +' ocf_heartbeat_SAPHana.7 \\\n'\ +' ocf_heartbeat_SAPHanaTopology.7 \\/' doc/man/Makefile.am # change provider company in hook scripts sed -i -e 's/\("provider_company": \)"SUSE"/\1"Red Hat"/g' %{saphana_prefix}-%{saphana_version}/srHook/SAPHanaSR.py @@ -112,12 +123,9 @@ sed -i -e 's/susChkSrv/ChkSrv/g' %{saphana_prefix}-%{saphana_version}/srHook/sus sed -i -e 's/suschksrv/chksrv/g' %{saphana_prefix}-%{saphana_version}/srHook/susChkSrv.py sed -i -e 's/sustkover_timeout/tkover_timeout/g' %{saphana_prefix}-%{saphana_version}/srHook/susChkSrv.py -# add patches -# %patch0 -p1 - %build if [ ! -f configure ]; then - ./autogen.sh + ./autogen.sh fi %if 0%{?fedora} >= 11 || 0%{?centos} > 5 || 0%{?rhel} > 5 @@ -142,9 +150,9 @@ export CFLAGS %configure \ %if 0%{?fedora} || 0%{?centos} > 7 || 0%{?rhel} > 7 || 0%{?suse_version} - PYTHON="%{__python3}" \ + PYTHON="%{__python3}" \ %endif - %{conf_opt_fatal} \ + %{conf_opt_fatal} \ %if %{defined _unitdir} --with-systemdsystemunitdir=%{_unitdir} \ %endif @@ -152,8 +160,8 @@ export CFLAGS --with-systemdtmpfilesdir=%{_tmpfilesdir} \ --with-rsctmpdir=/run/resource-agents \ %endif - --with-pkg-name=resource-agents \ - --with-ras-set=%{rasset} + --with-pkg-name=resource-agents \ + --with-ras-set=%{rasset} %if %{defined jobs} JFLAGS="$(echo '-j%{jobs}')" @@ -199,6 +207,13 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents %exclude /usr/src %changelog +* Fri Sep 20 2024 Janine Fuchs - 0.162.3-5 +- Fix regression in SAPHanaTopology agent. + Resolves: RHEL-59660 + +- Remove perl dependency from package. + Resolves: RHEL-59669 + * Fri Feb 2 2024 Janine Fuchs - 0.162.3-2 - Rebase to SAPHanaSR 0.162.3 upstream release and include the ChkSrv.py hook script to handle hanging HDBindexserver services