-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #270 from fmherschel/angi-devel
Angi devel
- Loading branch information
Showing
269 changed files
with
7,646 additions
and
2,178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#!/bin/bash | ||
# | ||
# SAPHanaSR-alert | ||
# SAPHanaSR-alert-fencing | ||
# Author: Lars Pinne Fabian Herschel, June 2024 | ||
# Support: [email protected] | ||
# License: GNU General Public License (GPL) | ||
# Copyright: (c) 2024 SUSE LLC | ||
# Version: 2024-06-18-15:33 | ||
# Version: 2024-08-09-14:35 | ||
# | ||
# crm configure alert nodes-1 "/usr/bin/SAPHanaSR-alert" select nodes | ||
# crm configure alert fencing-1 "/usr/bin/SAPHanaSR-alert" select fencing attributes alert_uptime_threshold=300 | ||
# crm configure alert nodes-1 "/usr/bin/SAPHanaSR-alert-fencing" select nodes | ||
# crm configure alert fencing-1 "/usr/bin/SAPHanaSR-alert-fencing" select fencing attributes alert_uptime_threshold=300 | ||
# | ||
|
||
logger_tag="SAPHanaSR-alert-fencing" | ||
|
@@ -20,13 +20,12 @@ crm_alert_kind="${CRM_alert_kind:-manual call}" | |
crm_alert_node="${CRM_alert_node:-$HOSTNAME}" | ||
crm_alert_desc="${CRM_alert_desc:-no description provided}" | ||
|
||
$logger -t "$logger_tag" "AH: begin event '$crm_alert_kind'" | ||
cache_file="/run/crm/SAPHanaSR_site_cache" | ||
|
||
alert_uptime_threshold="${alert_uptime_threshold:-300}" | ||
|
||
IFS=. read -r sys_uptime REST </proc/uptime | ||
/usr/bin/logger -t "$logger_tag" "AH: begin event '$crm_alert_kind' (uptime=$sys_uptime, alert_uptime_threshold=$alert_uptime_threshold)" | ||
$logger -t "$logger_tag" "AH: begin event '$crm_alert_kind' (uptime=$sys_uptime, alert_uptime_threshold=$alert_uptime_threshold)" | ||
|
||
|
||
function process_fencing() | ||
|
@@ -43,9 +42,9 @@ function process_fencing() | |
if [[ "$local_site_name" != "" && "$fenced_site_name" == "$local_site_name" ]]; then | ||
$logger -t "$logger_tag" "DEC: FENCE ($fenced_site_name == $local_site_name)" | ||
sleep 10 | ||
/usr/sbin/crm --force node fence "${HOSTNAME}"; rc="$?" | ||
sudo /usr/sbin/crm --force node fence "${HOSTNAME}"; rc="$?" | ||
if [[ "$rc" != "0" ]]; then | ||
$logger -t "$logger_tag" "ACT: /usr/sbin/crm --force node fence ${HOSTNAME}; rc=$rc" | ||
$logger -t "$logger_tag" "ACT: sudo /usr/sbin/crm --force node fence ${HOSTNAME}; rc=$rc" | ||
fi | ||
else | ||
$logger -t "$logger_tag" "DEC: NO FENCE ($fenced_site_name != $local_site_name)" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ON_FAIL_ACTION=fence\ | ||
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 | ||
# | ||
#################################################################### | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
.\" Version: 1.2.4 | ||
.\" | ||
.TH SAPHanaSR-checkJson 8 "26 Nov 2024" "" "SAPHanaSR-angi" | ||
.\" TODO SAPHanaSR-testJson ? | ||
.\" | ||
.SH NAME | ||
SAPHanaSR-checkJson \- Check syntax of SAPHanaSR-tester JSON file. | ||
.PP | ||
.\" | ||
.SH SYNOPSIS | ||
.PP | ||
\fBSAPHanaSR-checkJson\fR [ --help | --version ] | ||
.br | ||
\fBSAPHanaSR-checkJson\fR --file \fIFILE\fR [ --quiet ] | ||
.PP | ||
.\" | ||
.SH DESCRIPTION | ||
.PP | ||
SAPHanaSR-checkJson is a tool for checking SAPHanaSR-tester JSON files for | ||
formally correct syntax. | ||
.PP | ||
.\" | ||
.SH OPTIONS | ||
.TP | ||
--help | ||
print help message and exit. | ||
.TP | ||
--file \fIFILE\fP | ||
specify the JSON file to check. | ||
.TP | ||
--quiet | ||
do not output JSON data on success. | ||
.TP | ||
--version | ||
print version and exit. | ||
.PP | ||
.\" | ||
.SH RETURN CODES | ||
.PP | ||
.B 0 | ||
Successful program execution. | ||
.br | ||
.B >0 | ||
Usage, syntax or execution errors. | ||
.PP | ||
.\" | ||
.PP | ||
.\" | ||
.SH EXAMPLES | ||
.PP | ||
\fB*\fP Check one of the predefined files. | ||
.PP | ||
.RS 2 | ||
# SAPHanaSR-checkJson --file /usr/share/SAPHanaSR-tester/json/angi-ScaleUp/maintenance_cluster_hana_running.json | ||
.RE | ||
.PP | ||
.\" | ||
.SH FILES | ||
.TP | ||
/usr/bin/SAPHanaSR-checkJson | ||
the program itself. | ||
.PP | ||
.\" | ||
.SH REQUIREMENTS | ||
.PP | ||
See REQUIREMENTS section in SAPHanaSR-tester(7) and SAPHanaSR-tests-syntax(5). | ||
.PP | ||
.\" | ||
.SH BUGS | ||
.PP | ||
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 | ||
.PP | ||
\fBSAPHanaSR-tester\fP(7) , \fBSAPHanaSR-tests-syntax\fP(5) , | ||
\fBSAPHanaSR-tests-classic-ScaleUp\fP(7) , | ||
\fBSAPHanaSR-tests-angi-ScaleUp\fP(7) , \fBSAPHanaSR-tests-angi-ScaleOut\fP(7) | ||
.PP | ||
.\" | ||
.SH AUTHORS | ||
.PP | ||
F.Herschel, L.Pinne. | ||
.PP | ||
.\" | ||
.SH COPYRIGHT | ||
.PP | ||
(c) 2023-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 | ||
.\" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
.\" Version: 1.001 | ||
.\" Version: 1.2.4 | ||
.\" | ||
.TH SAPHanaSR-testCluster 8 "03 Apr 2024" "" "SAPHanaSR-angi" | ||
.TH SAPHanaSR-testCluster 8 "24 Nov 2024" "" "SAPHanaSR-angi" | ||
.\" | ||
.SH NAME | ||
SAPHanaSR-testCluster \- Run functional tests for SAPHanaSR clusters. | ||
.PP | ||
.\" | ||
.SH SYNOPSIS | ||
.\" | ||
.PP | ||
\fBSAPHanaSR-testCluster\fR [ --help | --version ] | ||
.br | ||
\fBSAPHanaSR-testCluster\fR \fIOPTION\fR [ \fIOPTION\fR ... ] | ||
.PP | ||
.\" | ||
.SH DESCRIPTION | ||
.\" | ||
.PP | ||
SAPHanaSR-testCluster is a tool to run one of the predefined test cases on a | ||
given test cluster. For that purpose it is called with options specifying the | ||
test case and the properties of the cluster to be tested. | ||
|
@@ -23,7 +23,6 @@ and test automation frameworks. | |
.PP | ||
.\" | ||
.SH OPTIONS | ||
.\" | ||
.TP | ||
--help | ||
print help message and exit. | ||
|
@@ -40,6 +39,9 @@ print and log debug messages. | |
--logFile \fIFILE\fP | ||
path to log file. | ||
.TP | ||
--password \fIPASSWORD\fP | ||
remote root user´s password (for debugging only). | ||
.TP | ||
--printTestProperties | ||
print test properties and exit. | ||
.TP | ||
|
@@ -60,10 +62,10 @@ path to testcase description file. | |
.TP | ||
--version | ||
print version and exit. | ||
|
||
.PP | ||
.\" | ||
.SH RETURN CODES | ||
.PP | ||
.B 0 | ||
Successful program execution. | ||
.br | ||
|
@@ -72,7 +74,6 @@ Usage, syntax or execution errors. | |
.PP | ||
.\" | ||
.SH EXAMPLES | ||
.\" | ||
.PP | ||
\fB*\fR Running a very basic functional test. | ||
.PP | ||
|
@@ -118,7 +119,6 @@ Test ID is 8585, logfile is test.log, debug output is omitted. | |
.PP | ||
.\" | ||
.SH FILES | ||
.\" | ||
.TP | ||
/usr/bin/SAPHanaSR-testCluster | ||
the program itself. | ||
|
@@ -127,10 +127,10 @@ the program itself. | |
functional tests for SAPHanaSR-angi scale-up scenarios. | ||
.TP | ||
/usr/share/SAPHanaSR-tester/json/angi-ScaleOut/ | ||
functional tests for SAPHanaSR-angi scale-out ERP scenarios, without HANA host auto-autofailover. | ||
functional tests for SAPHanaSR-angi scale-out ERP scenarios, without HANA host auto-failover. | ||
.TP | ||
/usr/share/SAPHanaSR-tester/json/angi-ScaleOut-BW/ | ||
functional tests for SAPHanaSR-angi scale-out BW scenarios, with HANA host auto-autofailover. Not yet implemented. | ||
functional tests for SAPHanaSR-angi scale-out BW scenarios, with HANA host auto-failover. Not yet implemented. | ||
.TP | ||
/usr/share/SAPHanaSR-tester/json/classic-ScaleUp/ | ||
functional tests for SAPHanaSR classic scale-up scenarios. | ||
|
@@ -144,36 +144,43 @@ not yet implemented. | |
$PWD/.test_properties | ||
auto-generated properties file for called shell scripts. No need to touch. | ||
.TP | ||
/usr/bin/ | ||
TODO | ||
/usr/bin/SAPHanaSR-showAttr | ||
script SAPHanaSR-showAttr from SAPHanaSR-angi. | ||
.TP | ||
/usr/bin/sct_test_* | ||
shell scripts for un-easy tasks on the cluster nodes. | ||
.PP | ||
.\" | ||
.SH REQUIREMENTS | ||
.\" | ||
.PP | ||
See the REQUIREMENTS section in SAPHanaSR-tester(7) and SAPHanaSR-angi(7). | ||
Of course, HANA database and Linux cluster have certain requirements. | ||
Please refer to the product documentation. | ||
.PP | ||
.\" | ||
.SH BUGS | ||
.PP | ||
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 | ||
.PP | ||
\fBSAPHanaSR-tester\fP(7) , \fBSAPHanaSR-tests-syntax\fP(5) , | ||
\fBSAPHanaSR-tests-description\fP(7) , | ||
\fBSAPHanaSR-tests-description\fP(7) , \fBSAPHanaSR-tests-classic-ScaleUp\fP(7) , | ||
\fBSAPHanaSR-tests-angi-ScaleUp\fP(7) , \fBSAPHanaSR-tests-angi-ScaleOut\fP(7) , | ||
\fBSAPHanaSR-angi\fP(7) , \fBSAPHanaSR-showAttr\fP(8) , | ||
\fBcrm_mon\fP(8) , \fBcrm\fP(8) , \fBcs_clusterstate\fP(8) | ||
\fBcrm_mon\fP(8) , \fBcrm\fP(8) , \fBcs_clusterstate\fP(8) , \fBcs_show_cluster_actions\fP(8) , | ||
.PP | ||
.\" | ||
.SH AUTHORS | ||
.PP | ||
F.Herschel, L.Pinne. | ||
.PP | ||
.\" | ||
.SH COPYRIGHT | ||
.PP | ||
(c) 2023-2024 SUSE LLC | ||
.br | ||
The package SAPHanaSR-tester comes with ABSOLUTELY NO WARRANTY. | ||
|
Oops, something went wrong.