Skip to content

Commit

Permalink
Merge pull request #235 from fmherschel/angi-devel
Browse files Browse the repository at this point in the history
Angi devel
  • Loading branch information
fmherschel authored Feb 15, 2024
2 parents f778f91 + 0e1bb87 commit fc85810
Show file tree
Hide file tree
Showing 16 changed files with 694 additions and 116 deletions.
2 changes: 1 addition & 1 deletion SAPHanaSR-angi.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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.4
Version: 1.2.5
Release: 0
Url: https://www.suse.com/c/fail-safe-operation-of-sap-hana-suse-extends-its-high-availability-solution/

Expand Down
101 changes: 59 additions & 42 deletions man/SAPHanaSR-replay-archive.8
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
.\" Version: 1.001
.\"
.TH SAPHanaSR-replay-archive 8 "13 Apr 2023" "" "SAPHanaSR"
.TH SAPHanaSR-replay-archive 8 "09 Feb 2024" "" "SAPHanaSR"
.\"
.SH SYNOPSIS
\fBSAPHanaSR-replay-archive\fR [ --help | --version ]
.br
\fBSAPHanaSR-replay-archive\fR [--sid=LIST_OF_SIDS] CRM_REPORT_ARCHIVE
\fBSAPHanaSR-replay-archive\fR --sid \fISID\fR --cib \fICIB\fR [\fICIB\fR [...]]
[--format \fIFORMAT\fR] [--select \fICOLUMN\fR] [--sort \fISORT\fR]
[--properties \fIPROPERTIES\fR] [--from \fIFROM\fR] [--to \fITO\fR]
.br
\fBSAPHanaSR-replay-archive\fR [--sid=LIST_OF_SIDS] --pengine=PATH_TO_PENGINE_FILES

.\"
.SH DESCRIPTION
SAPHanaSR-replay-archive can be used to re-play SAPHanaSR status changes info
Expand All @@ -18,18 +20,36 @@ files and shows status information in historical order. Basically SAPHanaSR-show
is called for each pe-input file.
.\"
.SH OPTIONS
.HP
\fB --help\fR
show help.
.HP
\fB --version\fR
show version.
.HP
\fB --sid=\fRLIST_OF_SIDS
Option to specify a list of SIDs
.HP
\fB --format=\fRFORMAT
Output format (tables, book or script).
.TP
\fB--help\fR
show help
.TP
\fB--version\fR
show version
.TP
\fB--sid\fR \fISID\fR
specify the SID to check for
.TP
\fB--cib\fR [ \fICIB\fR [\fICIB\fR [...]] | ./pengine/* ]
specify the path to CIB file(s)
.TP
\fB--format\fR [ table | path | script | json ]
output format, default is table.
.TP
\fB--from\fR "\fIYYYY-MM-DD HH:MM:SS\fR"
from which point in time to show
.TP
\fB--to\fR "\fIYYYY-MM-DD HH:MM:SS\fR"
to which point in time to show
.TP
\fB--sort\fR \fICOLUMN\fR
specify the column name to sort by
.TP
\fB--select\fR [ default | test | minimal | sr | all ]
selecton of attributes to be printed, default is default
.TP
\fB--properties\fR \fIPROPERTIES\fR
specify the properties file
.\"
.SH RETURN CODES
.B 0
Expand All @@ -39,25 +59,25 @@ Successful program execution.
Usage, syntax or execution errors.
.\"
.SH EXAMPLES
.TP
* Replay SAPHanaSR-showAttr data from all pe-input files in hb_report-06-06-2019.tar.bz2 .
# SAPHanaSR-replay-archive hb_report-06-06-2019.tar.bz2
.TP
* Show system replication status history from an HANA scale-out cluster.
# SAPHanaSR-replay-archive hb_report-06-06-2019.tar.bz2 | grep ^global
.\".TP
.\"* Show system replication status history from an HANA scale-up cluster.
.\"# SAPHanaSR-replay-archive hb_report-08-05-2019.tar.bz2 | grep -A13 ^global SAPHanaSR-replay-archive.txt | awk '$1=="global"{print "@",$0}; $11=="SOK"||$11=="SFAIL"||$11=="SWAIT"||$11=="WAIT4PRIM"{print $11}' | tr -d "\\n" | tr "@" "\\n"
.\".TP
.\"* Show system replication primary from an HANA scale-up cluster.
.\"# SAPHanaSR-showAttr hb_report-08-05-2019.tar.bz2 | grep -A13 ^global SAPHanaSR-replay-archive.txt | awk '$1=="global"{print "@",$0}; $2=="PROMOTED"{print $1,$2}' | tr -d "\\n" | tr "@" "\\n"
.TP
* Filter replay of SAPHanaSR actions from hb_report for a specific host.
# SAPHanaSR-replay-archive --format=script hb_suse.tar.bz2 |\\
SAPHanaSR-filter --search='Hosts/lv9054/role' --filterDouble
.TP
* Replay SAPHanaSR-showAttr data from all pe-input files in local directory /var/lib/pacemaker/pengine/.
# SAPHanaSR-replay-archive --pengine=/var/lib/pacemaker/pengine/
.PP
* Replay SAPHanaSR-showAttr data from crm_report.
.PP
Report has been extracted into directory crm_report-08-05-2024, SID is EVA,
DC node is node01.
.PP
.RS 2
# SAPHanaSR-replay-archive --sid EVA --cib crm_report-08-05-2024/node1/pengine/*
.RE
.PP
* Replay SAPHanaSR-showAttr data from crm_report, use parseable output format.
.PP
Report has been extracted into directory crm_report-08-05-2024, SID is EVA,
DC node is node01, output format is "script".
.PP
.RS 2
# SAPHanaSR-replay-archive --sid EVA --cib crm_report-08-05-2024/node1/pengine/* --format script
.RE
.PP
.\"
.SH FILES
.TP
Expand All @@ -70,26 +90,23 @@ the working horse.
/var/lib/pacemaker/pengine/
usual local pengine log directory.
.TP
<CRM_REPORT_ARCHIVE>-tmp/
per call created working directory.
.TP
<CRM_REPORT_ARCHIVE>-tmp/hb_report_log/<NODE>/pengine/pe-input-<NUM>.bz2
<CRM_REPORT_DIR>/<DC_NODE>/pengine/pe-input-<NUM>.bz2
extracted pe-input files.
.TP
<CRM_REPORT_ARCHIVE>-tmp/hb_report_log/<NODE>/cib.xml
<CRM_REPORT_DIR><DC_NODE>/cib.xml
extracted CIB file.
.\"
.SH BUGS
Feedback is welcome, please mail to [email protected].
.SH SEE ALSO
\fBSAPHanaSR\fP(7), \fBSAPHanaSR-ScaleOut\fP(7) , \fBSAPHanaSR-showAttr\fP(8) ,
\fBSAPHanaSR-filter\fP(8) , \fBcrm_report\fP(8) , \fBcrm_simulate\fP(8)
\fBSAPHanaSR-angi\fP(7), \fBSAPHanaSR-showAttr\fP(8) ,
\fBcrm_report\fP(8) , \fBcrm_simulate\fP(8)
.\"
.SH AUTHORS
A.Briel, F.Herschel, L.Pinne.
.\"
.SH COPYRIGHT
(c) 2019-2023 SUSE LLC
(c) 2019-2024 SUSE LLC
.br
SAPHanaSR-replay-archive comes with ABSOLUTELY NO WARRANTY.
.br
Expand Down
46 changes: 23 additions & 23 deletions man/SAPHanaSR-showAttr.8
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
.\" Version: 1.001
.\"
.TH SAPHanaSR-showAttr 8 "20 Nov 2023" "" "SAPHanaSR"
.TH SAPHanaSR-showAttr 8 "24 Jan 2024" "" "SAPHanaSR"
.\"
.SH NAME
SAPHanaSR-showAttr \- Shows Linux cluster attributes for SAP HANA system replication.
.\"
.SH SYNOPSIS
\fBSAPHanaSR-showAttr\fR [ --help | --version | --path2table ]
\fBSAPHanaSR-showAttr\fR [ --help | --version ]
.br
\fBSAPHanaSR-showAttr\fR [ --sid=SID[:INO] ] [ --select=SELECTION ] [ --sort=FIELD ] [ --format=FORMAT ] [ --cib=OFFLINE_CIB_FILE ]
\fBSAPHanaSR-showAttr\fR [ --sid \fISID\fR ] [ --select \fISELECT\fR ]
[ --sort \fISORT\fR ] [ --format \fIFORMAT\fR ] [ --cib \fIOFFLINE_CIB_FILE\fR ]
.\"
.SH DESCRIPTION
SAPHanaSR-showAttr shows Linux cluster attributes for SAP HANA system replication automation.
Expand Down Expand Up @@ -55,7 +56,7 @@ maintenance status of Linux cluster resources (\fBmaintenance\fP)
.br
promotability of Linux cluster clone resources (\fBpromotable\fP)
.br
target role of the Linux cluster promotable clone resources (\fBtarget-role\fP)
target role of the Linux cluster resources (\fBtarget-role\fP)
.TP
Sites section
HANA site name (\fBSites\fP)
Expand All @@ -68,7 +69,7 @@ HANA current master nameserver for that site (\fBmns\fP)
.br
HANA replication operation mode (\fBopMode\fP)
.br
HANA system replication status from HA/DR provider hook (\fBsrHook\fP)
HANA system replication status from srConnectionChanged() (\fBsrHook\fP)
.br
HANA system replication mode (\fBsrMode\fP)
.br
Expand Down Expand Up @@ -96,9 +97,9 @@ HANA site where the host sits (\fBsite\fP)
.br
maintenance state of Linux cluster node (\fBstandby\fP)
.br
HANA system replication takeover action, indicated by preTakeover() (\fBsra\fP)
HANA system replication takeover action from preTakeover() (\fBsra\fP)
.br
HANA system replication takeover action history, (\fBsrah\fP)
HANA system replication takeover action history (\fBsrah\fP)
.br
Linux cluster node fence status (\fBterminate\fP)
.br
Expand Down Expand Up @@ -255,7 +256,9 @@ also ocf_suse_SAPHanaController(7).

Value: [ started | disabled ]

Should the resource be started or stopped (disableld) by the Linux cluster.
Should the resource be started or stopped (disabled) by the Linux cluster.
The attribute is shown after it has been changed from the default.
The field might appear or disappear, depending on cluster maintenance tasks.
.PP
.B filter
- SAPHanaController filter for logging
Expand Down Expand Up @@ -527,24 +530,21 @@ show help.
\fB --version\fR
show version.
.TP 4
\fB --path2table\fR
convert script-style input pipe back into normal output.
.TP 4
\fB --select=\fISELECTION\fR
\fB --select\fR \fISELECT\fR
.\" TODO explain meaning of values
show selected information only. Allowed values: [ all | default | minimal | sr | cluster | cluster2 | cluster3 ]. Default is default.
.TP 4
\fB --sid=\fISID\fR[:\fIINO\fR]
\fB --sid\fR \fISID\fR
use SAP system ID \fISID\fR. Should be autodetected, if there is only one SAP HANA instance installed on the local cluster node. The SAP system ID is a 3 alphanum string with a valid SAP system name like SLE, HAE, FH1, C11, or P42.
Optional: Use SAP instance number \fIINO\fR. Should be autodetected, if there is only one SAP HANA instance installed on the local cluster node. The SAP instance number must be represented by a two digit numer like 00, 05 or 42. Some numbers ares not allowed, e.g. 98.
\." Optional: Use SAP instance number \fIINO\fR. Should be autodetected, if there is only one SAP HANA instance installed on the local cluster node. The SAP instance number must be represented by a two digit numer like 00, 05 or 42. Some numbers ares not allowed, e.g. 98.
.TP 4
\fB --sort=\fIFIELD\fR
\fB --sort\fR \fIFIELD\fR
sort Hosts section table by field. Allowed values: [ roles | site ]. Default is sort by hostnames.
.TP 4
\fB --format=\fIFORMAT\fR
\fB --format\fR \fIFORMAT\fR
output format. Allowed values: [ script | tables | json | tester ]. Default is tables.
.TP 4
\fB --cib=\fIOFFLINE_CIB_FILE\fR
\fB --cib\fR \fIOFFLINE_CIB_FILE\fR
read data from given offline CIB file.
.\"
.SH RETURN CODES
Expand All @@ -561,16 +561,16 @@ show all SAPHanaSR attributes and relevant cluster maintenance states.
.br
If the roles sub-fields are :::: landscapeHostConfiguration.py has not been able to detect the HANA roles during last recent RA monitor operation. Likely HANA was down or sudo <sid>adm failed.
.TP 4
# SAPHanaSR-showAttr --sort=roles
# SAPHanaSR-showAttr --sort roles
show all SAPHanaSR attributes in the cluster and sort host table output by roles.
.TP 4
# SAPHanaSR-showAttr --sid=HA1:10 --cib=./hb_report-17-07-2019/grauenstein01/cib.xml
# SAPHanaSR-showAttr --sid HA1 --cib ./hb_report-17-07-2019/grauenstein01/cib.xml
show all SAPHanaSR attributes for SAP System ID HA1 and instance number 10 from given CIB file.
.TP 4
# SAPHanaSR-showAttr | grep -e master: -e worker: -e slave:
show SAPHanaSR promotion scores on running nodes.
.TP 4
# SAPHanaSR-showAttr --format=script | egrep -v '/(version|op_mode|vhost|remoteHost|node_state|site)=' | SAPHanaSR-showAttr --path2table
# SAPHanaSR-showAttr --format script | egrep -v '/(version|op_mode|vhost|remoteHost|node_state|site)=' | SAPHanaSR-showAttr --path2table
reduce output to selected fields.
.TP 4
# watch -n9 "crm_mon -1r --include=none,nodes,resources,failures;echo; \\
Expand All @@ -584,8 +584,8 @@ display comprehensive overview on Linux cluster and HANA resources, update every
/usr/bin/SAPHanaSR-showAttr
the program itself.
.TP
/usr/lib/SAPHanaSR-angi/SAPHanaSRTools.pm
needed functions.
/usr/lib/SAPHanaSR-angi/
needed libraries.
.TP
/usr/sap/hostctrl/exe/saphostctrl
the SAP host control command.
Expand Down Expand Up @@ -626,7 +626,7 @@ A.Briel, F.Herschel, L.Pinne.
.br
(c) 2015-2017 SUSE Linux GmbH, Germany.
.br
(c) 2018-2023 SUSE LLC
(c) 2018-2024 SUSE LLC
.br
SAPHanaSR-showAttr comes with ABSOLUTELY NO WARRANTY.
.br
Expand Down
Loading

0 comments on commit fc85810

Please sign in to comment.