Skip to content

Commit

Permalink
Merge pull request #251 from fmherschel/angi-devel
Browse files Browse the repository at this point in the history
Angi devel to be merged into main
  • Loading branch information
angelabriel authored Apr 11, 2024
2 parents fc85810 + 0b3383f commit 6584442
Show file tree
Hide file tree
Showing 117 changed files with 3,846 additions and 1,144 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

FILE_LIST = LICENSE \
README.md \
crm_cfg \
icons \
man \
ra \
Expand Down
5 changes: 4 additions & 1 deletion Makefile-tester
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@

FILE_LIST = LICENSE \
README.md \
test \
crm_cfg \
man-tester \
man-tester-client \
test \
tools \

PKG = SAPHanaSR-tester
SPECFILE = ${PKG}.spec
Expand Down
11 changes: 8 additions & 3 deletions SAPHanaSR-angi.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# spec file for package SAPHanaSR
# spec file for package SAPHanaSR-angi
#
# Copyright (c) 2013-2014 SUSE Linux Products GmbH, Nuernberg, Germany.
# Copyright (c) 2014-2016 SUSE Linux GmbH, Nuernberg, Germany.
# Copyright (c) 2017-2023 SUSE LLC.
# Copyright (c) 2017-2024 SUSE LLC.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
Expand All @@ -21,7 +21,7 @@ License: GPL-2.0
Group: Productivity/Clustering/HA
AutoReqProv: on
Summary: Resource agents to control the HANA database in system replication setup
Version: 1.2.5
Version: 1.2.6
Release: 0
Url: https://www.suse.com/c/fail-safe-operation-of-sap-hana-suse-extends-its-high-availability-solution/

Expand Down Expand Up @@ -78,6 +78,7 @@ mkdir -p %{buildroot}/usr/bin
mkdir -p %{buildroot}%{_docdir}/%{name}
mkdir -p %{buildroot}/usr/share/%{name}/icons
mkdir -p %{buildroot}/usr/share/%{name}/samples
mkdir -p %{buildroot}/usr/share/%{name}/samples/crm_cfg/angi-ScaleUp
mkdir -p %{buildroot}/usr/lib/ocf/resource.d/suse
mkdir -p %{buildroot}/usr/lib/%{name}
mkdir -p %{buildroot}%{_mandir}/man7
Expand All @@ -95,6 +96,9 @@ install -m 0644 srHook/susCostOpt.py %{buildroot}/usr/share/%{name}/
install -m 0644 srHook/susChkSrv.py %{buildroot}/usr/share/%{name}/
install -m 0444 srHook/global.ini_* %{buildroot}/usr/share/%{name}/samples

# crm config templates
install -m 0644 crm_cfg/angi-ScaleUp/[0-9]*_* %{buildroot}/usr/share/%{name}/samples/crm_cfg/angi-ScaleUp

# icons for SAPHanaSR-monitor
install -m 0444 icons/* %{buildroot}/usr/share/%{name}/icons

Expand All @@ -111,6 +115,7 @@ install -m 0555 tools/SAPHanaSR-replay-archive-legacy %{buildroot}/usr/bin
install -m 0555 tools/SAPHanaSR-filter-legacy %{buildroot}/usr/bin
install -m 0555 tools/SAPHanaSR-hookHelper %{buildroot}/usr/bin
install -m 0555 tools/SAPHanaSR-manageProvider %{buildroot}/usr/bin
install -m 0555 tools/SAPHanaSR-upgrade-to-angi-demo %{buildroot}/usr/share/%{name}/samples
install -m 0444 tools/SAPHanaSRTools.pm %{buildroot}/usr/lib/%{name}
install -m 0444 tools/saphana_sr_tools.py %{buildroot}/usr/lib/%{name}

Expand Down
44 changes: 36 additions & 8 deletions SAPHanaSR-tester.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#
# spec file for package SAPHanaSR
# spec file for package SAPHanaSR-tester
#
# Copyright (c) 2023 SUSE LLC.
# Author: Fabian Herschel
# Copyright (c) 2023-2024 SUSE LLC.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
Expand All @@ -19,7 +20,7 @@ License: GPL-2.0
Group: Productivity/Clustering/HA
AutoReqProv: on
Summary: Test suite for SAPHanaSR clusters
Version: 1.2.8
Version: 1.2.13
Release: 0
Url: https://www.suse.com/c/fail-safe-operation-of-sap-hana-suse-extends-its-high-availability-solution/

Expand All @@ -31,6 +32,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build

Requires: python3

%package client
Group: Productivity/Clustering/HA
Summary: Test suite for SAPHanaSR clusters - SAPHanaSR-tester-client is to be installed on all SAPHanaSR classic nodes
Conflicts: SAPHanaSR-angi

%description
SAPHanaSR-tester is a suite for semi-automated tests of SAPHanaSR clusters. First focussed test-scenarios are angi-ScaleUp and angi-ScaleOut (e.g. for ERP systems).

Expand All @@ -44,17 +50,22 @@ Authors:
--------
Fabian Herschel

%description client
SAPHanaSR-tester-client is to be installed on all SAPHanaSR classic nodes to allow SAPHanaSR-tester to check the cluster attributes with the same method.

%prep
tar xf %{S:0}
#%define crmscr_path /usr/share/crmsh/scripts/

%build
gzip man-tester/*
gzip man-tester-client/*

%install
mkdir -p %{buildroot}/usr/bin
#mkdir -p %{buildroot}%{_docdir}/%{name}
mkdir -p %{buildroot}/usr/share/%{name}
mkdir -p %{buildroot}/usr/share/%{name}/samples/crm_cfg/angi-ScaleUp
mkdir -p %{buildroot}/usr/lib/%{name}
mkdir -p %{buildroot}%{_mandir}/man5
mkdir -p %{buildroot}%{_mandir}/man7
Expand All @@ -71,27 +82,44 @@ install -m 0755 test/callTest* %{buildroot}/usr/bin
install -m 0755 test/loopTests* %{buildroot}/usr/bin
install -m 0755 test/sct_* %{buildroot}/usr/bin

# client files
install -m 0755 tools/SAPHanaSR-showAttr %{buildroot}/usr/bin
mkdir -p %{buildroot}/usr/lib/SAPHanaSR-angi
install -m 0755 tools/saphana_sr_tools.py %{buildroot}/usr/lib/SAPHanaSR-angi

# test definitions
pwd
ls test/json
cp -va test/json %{buildroot}/usr/share/%{name}
cp -va test/www %{buildroot}/usr/share/%{name}
cp -a test/json %{buildroot}/usr/share/%{name}
cp -a test/www %{buildroot}/usr/share/%{name}
install -m 0644 crm_cfg/angi-ScaleUp/[0-9]*_* %{buildroot}/usr/share/%{name}/samples/crm_cfg/angi-ScaleUp

# manual pages
install -m 0444 man-tester/*.5.gz %{buildroot}%{_mandir}/man5
install -m 0444 man-tester/*.7.gz %{buildroot}%{_mandir}/man7
install -m 0444 man-tester/*.8.gz %{buildroot}%{_mandir}/man8

# man pages for client package
install -m 0444 man-tester-client/*.7.gz %{buildroot}%{_mandir}/man7

%files
%defattr(-,root,root)
/usr/share/%{name}
%dir /usr/lib/%{name}
/usr/lib/%{name}/saphana_sr_*.py
/usr/bin/*

/usr/bin/SAPHanaSR-testCluster
/usr/bin/SAPHanaSR-checkJson
/usr/bin/sct_*
/usr/bin/callTest*
/usr/bin/loopTests*
/usr/bin/cs_ssh
/usr/bin/SAPHanaSR-testCluster-html
%license LICENSE
#%dir %{_docdir}/%{name}
%doc README.md
%doc %{_mandir}/man*/*

%files client
/usr/bin/SAPHanaSR-showAttr
/usr/lib/SAPHanaSR-angi

%changelog
15 changes: 15 additions & 0 deletions crm_cfg/angi-ScaleUp/010_basics_crm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# base config (1)
#
property cib-bootstrap-options: \
cluster-name=SAP@@SID@@_@@INO@@ \
stonith-enabled=true \
stonith-action=reboot \
stonith-timeout=90 \
priority-fencing-delay=30
rsc_defaults rsc-options: \
migration-threshold=5000 \
resource-stickiness=1000
op_defaults op-options: \
timeout=600 \
record-pending=true
5 changes: 5 additions & 0 deletions crm_cfg/angi-ScaleUp/020_resource_sbd_crm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#
# primitive sbd (2)
#
primitive rsc_stonith_sbd stonith:external/sbd \
params pcmk_delay_base=15
14 changes: 14 additions & 0 deletions crm_cfg/angi-ScaleUp/030_clone_top_crm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# clone TOP (3)
#
primitive rsc_SAPHanaTop_@@SID@@_HDB@@INO@@ ocf:suse:SAPHanaTopology \
op monitor interval=50 timeout=600 \
op start interval=0 timeout=3600 \
op stop interval=0 timeout=300 \
params SID=@@SID@@ InstanceNumber=@@INO@@
#
clone cln_SAPHanaTop_@@SID@@_HDB@@INO@@ rsc_SAPHanaTop_@@SID@@_HDB@@INO@@ \
meta clone-node-max=1 interleave=true
#
####################################################################
#
14 changes: 14 additions & 0 deletions crm_cfg/angi-ScaleUp/040_clone_fil_crm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# clone FIL (4)
#
primitive rsc_SAPHanaFil_@@SID@@_HDB@@INO@@ ocf:suse:SAPHanaFilesystem \
op monitor interval=60 timeout=60 \
op start interval=0 timeout=10 \
op stop interval=0 timeout=20 on-fail=fence \
params SID=@@SID@@ InstanceNumber=@@INO@@
#
clone cln_SAPHanaFil_@@SID@@_HDB@@INO@@ rsc_SAPHanaFil_@@SID@@_HDB@@INO@@ \
meta clone-node-max=1 interleave=true
#
####################################################################
#
17 changes: 17 additions & 0 deletions crm_cfg/angi-ScaleUp/050_clone_con_crm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# promotable clone (5)
#
primitive rsc_SAPHanaCon_@@SID@@_HDB@@INO@@ ocf:suse:SAPHanaController \
op start interval=0 timeout=3600 \
op stop interval=0 timeout=3600 \
op promote interval=0 timeout=900 \
op monitor interval=60 role=Promoted timeout=700 \
op monitor interval=61 role=Unpromoted timeout=700 \
params SID=@@SID@@ InstanceNumber=@@INO@@ PREFER_SITE_TAKEOVER=yes DUPLICATE_PRIMARY_TIMEOUT=600 AUTOMATED_REGISTER=yes \
meta priority=100
#
clone mst_SAPHanaCon_@@SID@@_HDB@@INO@@ rsc_SAPHanaCon_@@SID@@_HDB@@INO@@ \
meta clone-max=2 clone-node-max=1 interleave=true promotable=true maintenance=true
#
####################################################################
#
7 changes: 7 additions & 0 deletions crm_cfg/angi-ScaleUp/060_resource_ip_crm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
# primitive IP (6)
#
primitive rsc_ip_@@SID@@ IPaddr2 \
params ip=@@IP@@ \
op monitor interval=60 timeout=20 \
op_params on_fail=restart
6 changes: 6 additions & 0 deletions crm_cfg/angi-ScaleUp/070_constraints_crm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# constraints (7)
#
colocation col_ip_prim_SAPHana_@@SID@@_HDB@@INO@@ 2000: rsc_ip_@@SID@@:Started mst_SAPHanaCon_@@SID@@_HDB@@INO@@:Promoted
#
order ord_SAPHana_@@SID@@_HDB@@INO@@ Optional: cln_SAPHanaTop_@@SID@@_HDB@@INO@@ mst_SAPHanaCon_@@SID@@_HDB@@INO@@
42 changes: 42 additions & 0 deletions crm_cfg/angi-ScaleUp/alternative-names.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# sle15 hana ScaleUp perfopt:
#
crm-bs.txt
crm-sbd.txt
crm-saphanatop.txt
crm-saphana.txt
crm-vip.txt
crm-cs.txt

#
# sle15 hana ScaleUp costopt:
#
crm-bs.txt
crm-saphanatop.txt
crm-saphana.txt
crm-vip.txt
crm-cs.txt
crm-si.txt
crm-con.txt

#
# sle15 hana ScaleOut
#
crm-bs.txt
crm-fencing.txt
crm-saphanatop.txt
crm-saphanacon.txt
crm-vip.txt
crm-cs.txt

#
# sle15 hana ScaleOut Multi-Target
#
crm-bs.txt
crm-fencing.txt
crm-saphanatop.txt
crm-saphanacon.txt
crm-vip.txt
crm-cs.txt


68 changes: 68 additions & 0 deletions man-tester-client/SAPHanaSR-tester-client.7
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
.\" Version: 1.001
.\"
.TH SAPHanaSR-tester-client 7 "27 Jan 2024" "" "SAPHanaSR"
.\"
.SH NAME
SAPHanaSR-tester-client \- Client for functional testing SAPHanaSR clusters.
.PP
.\"
.DESCRIPTION
.\"
SAPHanaSR-tester-client is a package that allows to use SAPHanaSR-tester for
testing classical SAPHanaSR and SAPHanaSR-ScaleOut HA clusters.

.B SAPHanaSR-tester is shipped as technology preview.

The package provides a specific version of SAPHanaSR-shwoAttr, compatible to
SAPHanaSR-angi and SAPHanaSR-tester.
.PP
.\"
.SH EXAMPLES
.\"
\fB*\fR Checking the SAPHanaSR-showAttr.
.PP
The specific SAPHanaSR-showAttr is called to show the output format needed for
testing. See manual page SAPHanaSR-showAttr(8) from package SAPHanaSR-angi for
details.
.PP
.RS 2
# /usr/bin/SAPHanaSR-showAttr --format=tester
.RE
.PP
.\"
.SH FILES
.\"
.TP
/usr/bin/SAPHanaSR-showAttr
specific SAPHanaSR-showAttr, compatible to SAPHanaSR-angi and SAPHanaSR-tester
.PP
.\"
.SH REQUIREMENTS
See SAPHanaSR-tester(7), SAPHanaSR-tests-classic-ScaleUp(7) and SAPHanaSR(7).
.\"
.SH BUGS
The SAPHanaSR-tester-client is under development. Syntax and formats are
subject to change.
.br
In case of any problem, please use your favourite SAP support process to open
a request for the component BC-OP-LNX-SUSE.
Please report any other feedback and suggestions to [email protected].
.PP
.\"
.SH SEE ALSO
\fBSAPHanaSR-tester\fP(7) , \fBSAPHanaSR-tests-classic-ScaleUp\fP(7) ,
\fBSAPHanaSR-showAttr\fP(8), \fBSAPHanaSR\fP(7)
.PP
.\"
.SH AUTHORS
F.Herschel, L.Pinne.
.PP
.\"
.SH COPYRIGHT
(c) 2024 SUSE LLC
.br
The package SAPHanaSR-tester comes with ABSOLUTELY NO WARRANTY.
.br
For details see the GNU General Public License at
http://www.gnu.org/licenses/gpl.html
.\"
Loading

0 comments on commit 6584442

Please sign in to comment.