diff --git a/SAPHanaSR-tester.changes b/SAPHanaSR-tester.changes index e69de29b..163549ca 100644 --- a/SAPHanaSR-tester.changes +++ b/SAPHanaSR-tester.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Mon Nov 13 11:43:23 UTC 2023 - Fabian Herschel + +- version 1.2.4 as base for test package diff --git a/SAPHanaSR-tester.spec b/SAPHanaSR-tester.spec index 2b71d59e..abd3bd9e 100644 --- a/SAPHanaSR-tester.spec +++ b/SAPHanaSR-tester.spec @@ -19,7 +19,7 @@ License: GPL-2.0 Group: Productivity/Clustering/HA AutoReqProv: on Summary: Test suite for SAPHanaSR clusters -Version: 1.2.2 +Version: 1.2.4 Release: 0 Url: https://www.suse.com/c/fail-safe-operation-of-sap-hana-suse-extends-its-high-availability-solution/ diff --git a/man-tester/SAPHanaSR-testCluster.8 b/man-tester/SAPHanaSR-testCluster.8 new file mode 100644 index 00000000..a39b6712 --- /dev/null +++ b/man-tester/SAPHanaSR-testCluster.8 @@ -0,0 +1,117 @@ +.\" Version: 1.001 +.\" +.TH SAPHanaSR-testCluster 8 "11 Nov 2023" "" "SAPHanaSR-angi" +.\" +.SH NAME +SAPHanaSR-testCluster \- Run functional testing for SAPHanaSR clusters. +.PP +.\" +.SH SYNOPSIS +.\" +\fBSAPHanaSR-testCluster\fR [ --help | --version ] +.br +\fBSAPHanaSR-testCluster\fR + +.\" +.SH DESCRIPTION +.\" +SAPHanaSR-testCluster TODO + +.PP +.\" +.SH OPTIONS +.TP +--testFile +path to testcase description file +.TP +--defaultChecksFile + +.TP +--properties + +.TP +--remoteNode + +.TP +--simulate + +.TP +--repeat + +.TP +--dumpFailures + +.TP +--logFile + +.PP +.\" +.SH RETURN CODES +.B 0 +Successful program execution. +.br +.B >0 +Usage, syntax or execution errors. +.PP +.\" +.SH EXAMPLES +.\" + +.PP +.\" +.SH FILES +.\" +/usr/share/SAPHanaSR-tester/json/angi-ScaleUp/ +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. +.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. +.TP +/usr/share/SAPHanaSR-tester/json/classic-ScaleUp/ +not yet implemented. +.TP +/usr/share/SAPHanaSR-tester/json/classic-ScaleOut/ +not yet implemented. +.TP +/usr/share/SAPHanaSR-tester/json/classic-ScaleOut-BW/ +not yet implemented. +.TP +$PWD/.test_properties +auto-generated properties file for called shell scripts. No need to touch. +.TP +/usr/bin/ +TODO +.PP +.\" +.SH REQUIREMENTS +.\" +See the REQUIREMENTS section in SAPHanaSR-tester(7). +.PP +.\" +.SH BUGS +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 feedback@suse.com. +.PP +.\" +.SH SEE ALSO +\fBSAPHanaSR-tester\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) +.PP +.\" +.SH AUTHORS +F.Herschel, L.Pinne. +.PP +.\" +.SH COPYRIGHT +(c) 2023 SUSE Linux GmbH, Germany. +.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 +.\" diff --git a/man-tester/SAPHanaSR-tester.7 b/man-tester/SAPHanaSR-tester.7 index 553f2dfc..0e6d1dc4 100644 --- a/man-tester/SAPHanaSR-tester.7 +++ b/man-tester/SAPHanaSR-tester.7 @@ -1,182 +1,158 @@ -.\" Version: 1.001 +.\" Version: 1.001 .\" .TH SAPHanaSR-tester 7 "11 Nov 2023" "" "SAPHanaSR-angi" .\" .SH NAME -SAPHanaSR-tester \- Tools for automating functional tests of SAPHanaSR clusters. +SAPHanaSR-tester \- Functional testing for SAPHanaSR clusters. .PP .\" .SH DESCRIPTION .\" -\fBOverview\fP -.PP SAPHanaSR-tester is a suite of tools for automating functional tests of SAP HANA system replication HA clusters. -The test cases are defined in JSON files. Each test is separated into steps. +Predefined functional tests are shipped for scale-up and scale-out scenarios. +This tests could be run out-of-the-box. The predefined tests also can be used +for creating new test definitions. So parameters for timing and expected +attributes can be customised. + +The test cases are defined in dedicated files. Each test is separated into +steps. For each step there is an expectation for SAPHanaSR attributes, which need to match. Additionally each step defines the 'next' step and an optional action to be triggered if the step status has been reached (all expectations match). +See section SYNTAX below for comparators and other details. For tests involving complex actions on the cluster nodes, predefined shell scripts are executed remotely. - .\" TODO state machine. + +See manual pages SAPHanaSR-tests-angi-ScaleUp(7) and +SAPHanaSR-tests-angi-ScaleOut(7) for predefined test cases and further details. +See also the REQUIREMENTS section below. + +.B SAPHanaSR-tester is shipped as technology preview. .PP -\fBTest cases\fP +.\" +.SH SYNTAX +.\" +The test cases are defined in JSON files. Each test case is described in one +file. It also can reference to defaults.json for common status definitions. .PP -Functional test are shipped for scale-up and scale-out scenarios. This tests -could be run out-of-the-box. +\fB*\fP Test step status .PP -a. Predefined functional tests for scale-up: -.TP -block_manual_takeover -blocked manual takeover -.TP -block_sr -block sr and check SFAIL attribute; unblock to recover -.TP -block_sr_and_freeze_prim_fs - -.TP -flup -like nop but very short sleep only - only for checking the test engine -.TP -freeze_prim_fs -freeze sap hana fs on primary master node -.TP -free_log_area -free log area on primary -.TP -freeze_prim_fs - -.TP -kill_prim_indexserver -Kill primary indexserver -.TP -kill_prim_inst -Kill primary instance +Each step contains an expectation for SAPHanaSR attributes, which need to +match. The step status are: .TP -kill_prim_node -Kill primary master node +globalUp +both sites are up and in sync .TP -kill_secn_indexserver -Kill secondary indexserver +globalDown +not yet implemented .TP -kill_secn_inst -Kill secondary instance +pHostUp +host p (expected to be primary before the test starts) is up .TP -kill_secn_node -Kill secondary master node +pSiteUp +site p is up .TP -maintenance_cluster_turn_hana - -.TP -maintenance_with_standby_nodes -standby+online secondary then standby+online primary -.TP -nop -no operation - check, wait and check again (stability check) -.TP -restart_cluster_hana_running - +sSiteUp +site s (expected to be secondary before the test starts) is up .TP -restart_cluster - +sHostUp +host s is up .TP -restart_cluster_turn_hana - +pHostDown +host p is down .TP -split_brain_prio -split brain with prio fencing to simulate fence of secondary +pSiteDown +site p is down .TP -standby_primary_node -standby primary node (and online again) +sSiteDown +site s is down .TP -standby_secondary_node -standby secondary node (and online again) -.RE +sHostDown +host s is down .PP -b. Predefined functional tests for scale-out: -.TP -block_manual_takeover -blocked manual takeover -.TP -free_log_area -free log area on primary -.TP -kill_prim_indexserver -Kill primary indexserver -.TP -kill_prim_inst -Kill primary instance -.TP -kill_prim_node -Kill primary master node -.TP -kill_prim_worker_indexserver -Kill primary worker indexserver -.TP -kill_prim_worker_inst -Kill primary worker instance -.TP -kill_prim_worker_node -Kill primary worker node -.TP -kill_secn_indexserver -Kill secondary indexserver -.TP -kill_secn_inst -Kill secondary instance +Note: Prefixes "s" and "p" are statically indicating geographical sites, as +seen at the beginning of a test. If a takeover happens during that test, the +final secondary site might be prefixed "p". +.PP +Each test step status is described by one or more conditions. Each condition +is described by one comparision. This conditions are combined by logical "AND". +Each comparision consists of one CIB SAPHanaSR attribute name, one comparator +and one value or regular expression. This comparator and expression could +contain logical "OR". A status with two conditions looks like this: +.PP +"\fR\fP": [ +.br + "\fR " , +.br + "\fR " +.br + ] +.PP +A set of comparators is implemented. Some take integers, some take regular +expression. In addition the "None" TODO. +.\" saphana_sr_test.py +.\" re.search("(.*) (==|!=|>|>=|<|<=|~|!~|>~|is) (.*)", single_check) .TP -kill_secn_node -Kill secondary master node +== +equal, integer .TP -kill_secn_worker_inst -Kill secondary worker instance +!= +not equal, integer .TP -kill_secn_worker_node -Kill secondary worker node +>= +greater or equal, integer .TP -maintenance_cluster_turn_hana - +<= +less or equal, interger .TP -maintenance_with_standby_nodes -standby+online secondary then standby+online primary +> +greater, integer .TP -nop -no operation - check, wait and check again (stability check) +< +less .TP -restart_cluster - +>~ +greater or like, first field integer and second field regular expression ( : ) .TP -restart_cluster_hana_running - +~ +like, regular expression .TP -restart_cluster_turn_hana - +!~ +not like, regular expression .TP -standby_primary_node -standby primary node (and online again) +is +TODO, the string "None" +.PP +\fB*\fP Test step actions +.PP +TODO .TP -standby_secondary_node -standby secondary node (and online again) +post +action after step, [ bmt | cleanup | spn | ssn | osn | script