- Fix regression in SAPHanaTopology agent.

Resolves: RHEL-59664

- Remove perl dependency from package.
  Resolves: RHEL-59672
This commit is contained in:
Janine Fuchs 2024-09-20 16:01:59 +02:00
parent 11db22fd7e
commit ba6d404d9c
2 changed files with 86 additions and 27 deletions

View File

@ -0,0 +1,43 @@
From 6062afd4f2da3972e3469b2ab8491e3314296efe Mon Sep 17 00:00:00 2001
From: AngelaBriel <abriel@suse.com>
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

View File

@ -25,36 +25,37 @@
%global saphana_prefix SAPHanaSR
%global saphana_version e8188e0
Name: resource-agents-sap-hana
Summary: SAP HANA cluster resource agents
Epoch: 1
Version: 0.162.3
Release: 1%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
License: GPLv2+
URL: https://github.com/SUSE/SAPHanaSR
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
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
Group: System Environment/Base
Group: System Environment/Base
%else
Group: Productivity/Clustering/HA
Group: Productivity/Clustering/HA
%endif
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
Source1: %{saphana_prefix}-%{saphana_version}.tar.gz
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
BuildRequires: automake autoconf gcc
BuildRequires: perl-interpreter python3-devel
BuildRequires: python3-devel
BuildRequires: libxslt glib2-devel
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
BuildRequires: docbook-style-xsl docbook-dtds
%endif
Requires: resource-agents >= 4.1.1
Conflicts: %{name}-scaleout
Requires: resource-agents >= 4.1.1
Conflicts: %{name}-scaleout
Requires: /bin/bash /usr/bin/grep /bin/sed /bin/gawk
Requires: perl
Requires: /bin/bash /usr/bin/grep /bin/sed /bin/gawk
%description
The SAP HANA resource agents interface with Pacemaker to allow
@ -64,10 +65,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
@ -78,21 +90,18 @@ 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
%global rasset linux-ha
%configure BASH_SHELL="/bin/bash" \
PYTHON="%{__python3}" \
%{conf_opt_fatal} \
--with-pkg-name=%{name} \
--with-ras-set=%{rasset}
PYTHON="%{__python3}" \
%{conf_opt_fatal} \
--with-pkg-name=%{name} \
--with-ras-set=%{rasset}
%if %{defined jobs}
JFLAGS="$(echo '-j%{jobs}')"
@ -138,6 +147,13 @@ rm -rf %{buildroot}
%exclude /usr/src
%changelog
* Fri Sep 20 2024 Janine Fuchs <jfuchs@redhat.com> - 0.162.3-5
- Fix regression in SAPHanaTopology agent.
Resolves: RHEL-59664
- Remove perl dependency from package.
Resolves: RHEL-59672
* Mon Jun 03 2024 Janine Fuchs <jfuchs@redhat.com> - 0.162.3-1
- Rebase to SAPHanaSR 0.162.3 upstream release and include the
ChkSrv.py hook script to handle hanging HDBindexserver services