Skip to content

Commit b1f3168

Browse files
authored
Merge pull request #253 from fmherschel/angi-devel
Angi verison 1.2.7
2 parents 6584442 + 33b5e9c commit b1f3168

13 files changed

+33
-32
lines changed

.github/workflows/ChecksAndLinters.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
# Steps represent a sequence of tasks that will be executed as part of the job
1818
steps:
1919
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121

2222
- name: Set up Python 3.10
23-
uses: actions/setup-python@v4
23+
uses: actions/setup-python@v5
2424
with:
2525
python-version: "3.10"
2626

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
osc
44
ibs
55
test.log
6+
misc

SAPHanaSR-angi.spec

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ License: GPL-2.0
2121
Group: Productivity/Clustering/HA
2222
AutoReqProv: on
2323
Summary: Resource agents to control the HANA database in system replication setup
24-
Version: 1.2.6
24+
Version: 1.2.7
2525
Release: 0
2626
Url: https://www.suse.com/c/fail-safe-operation-of-sap-hana-suse-extends-its-high-availability-solution/
2727

man/ocf_suse_SAPHanaFilesystem.7

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" Version: 1.001
22
.\"
3-
.TH ocf_suse_SAPHanaFilesystem 7 "13 Dec 2023" "" "OCF resource agents"
3+
.TH ocf_suse_SAPHanaFilesystem 7 "24 Apr 2024" "" "OCF resource agents"
44
.\"
55
.SH NAME
66
SAPHanaFilesystem \- Monitors mounted SAP HANA filesystems.
@@ -33,10 +33,8 @@ migration-threshold is reached.
3333
.PP
3434
* Behaviour on HANA secondary sites
3535
.PP
36-
In case of monitor failure the Linux cluster tries to stop and restart the
37-
SAPHanaFilesystem resource (not the real filesystem). This will be repeated until
38-
it gains success or migration-threshold is reached.
39-
.\" TODO migration-threshold?
36+
In case of monitor failure the Linux cluster is not informed by SAPHanaFilesystem
37+
resource agent.
4038
.PP
4139
* Background information
4240
.PP
@@ -457,7 +455,7 @@ F.Herschel, L.Pinne.
457455
.\"
458456
.SH COPYRIGHT
459457
.br
460-
(c) 2023 SUSE LLC
458+
(c) 2023-2024 SUSE LLC
461459
.br
462460
SAPHanaFilesystem comes with ABSOLUTELY NO WARRANTY.
463461
.br

ra/SAPHanaController

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
# License: GNU General Public License (GPL)
1616
# Copyright: (c) 2013,2014 SUSE Linux Products GmbH
17-
# (c) 2015-2023 SUSE LLC
17+
# (c) 2015-2024 SUSE LLC
1818
#
1919
# An example usage:
2020
# See usage() function below for more details...
@@ -36,7 +36,7 @@
3636
# systemReplicationStatus.py
3737
#
3838
#######################################################################
39-
SAPHanaControllerVersion="1.001.7"
39+
SAPHanaControllerVersion="1.2.7"
4040
#
4141
# Initialization:
4242
timeB=$(date '+%s')

ra/SAPHanaFilesystem

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# Author: Fabian Herschel, February 2023
1111
1212
# License: GNU General Public License (GPL)
13-
# Copyright: (c) 2023 SUSE LLC
13+
# Copyright: (c) 2023-2024 SUSE LLC
1414
#
1515
# An example usage:
1616
# See usage() function below for more details...
@@ -21,7 +21,7 @@
2121
# OCF_RESKEY_DIR_EXECUTABLE (optional, well known directories will be searched by default)
2222
#
2323
#######################################################################
24-
SAPHanaFilesystemVersion="0.3.0"
24+
SAPHanaFilesystemVersion="1.2.7"
2525
#
2626
# Initialization:
2727
timeB=$(date '+%s')

ra/SAPHanaTopology

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
# License: GNU General Public License (GPL)
1616
# Copyright: (c) 2014 SUSE Linux Products GmbH
17-
# (c) 2015-2023 SUSE LLC
17+
# (c) 2015-2024 SUSE LLC
1818
#
1919
# An example usage:
2020
# See usage() function below for more details...
@@ -32,7 +32,7 @@
3232
# systemReplicationStatus.py
3333
#
3434
#######################################################################
35-
SAPHanaTopologyVersion="1.001.7"
35+
SAPHanaTopologyVersion="1.2.7"
3636
#
3737
# Initialization:
3838
timeB=$(date '+%s')

ra/saphana-common-lib

+7-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# License: GNU General Public License (GPL)
1212
# Copyright: (c) 2014 SUSE Linux Products GmbH
1313
# (c) 2015-2016 SUSE Linux GmbH
14-
# (c) 2017-2023 SUSE LLC
14+
# (c) 2017-2024 SUSE LLC
1515
#
1616
# An example usage:
1717
# See usage() function below for more details...
@@ -23,7 +23,7 @@
2323
#
2424
#######################################################################
2525
#
26-
saphana_common_lib_version="1.001.1"
26+
saphana_common_lib_version="1.2.7"
2727
#
2828
#######################################################################
2929

@@ -437,6 +437,8 @@ function HANA_CALL() {
437437
local cmd=""
438438
local pre_script=""
439439
local output=""
440+
local suErr=""
441+
local cmdErr=""
440442
while [ $# -gt 0 ]; do
441443
case "$1" in
442444
--timeout ) timeOut=$2; shift;;
@@ -490,9 +492,9 @@ function HANA_CALL() {
490492
output=$(timeout --foreground -s 9 "$timeOut" su - "${sid}adm" -c "($pre_script; timeout -s 9 $timeOut $cmd > $cmd_out_log) >& $cmd_err_log" 2>"$su_err_log"); rc="$?"
491493
;;
492494
esac
493-
output=$(if [ -f "$cmd_out_log" ]; then cat "$cmd_out_log"; rm -f "$cmd_out_log"; fi)
494-
suErr=$(if [ -f "$su_err_log" ]; then cat "$su_err_log"; rm -f "$su_err_log"; else echo "NA"; fi)
495-
cmdErr=$(if [ -f "$cmd_err_log" ]; then cat "$cmd_err_log"; rm -f "$cmd_err_log"; else echo "NA"; fi)
495+
if [[ -f "$cmd_out_log" ]]; then output=$(<"$cmd_out_log"); rm -f "$cmd_out_log"; fi
496+
if [[ -f "$su_err_log" ]]; then suErr=$(<"$su_err_log"); rm -f "$su_err_log"; else suErr='NA'; fi
497+
if [[ -f "$cmd_err_log" ]]; then cmdErr=$(<"$cmd_err_log"); rm -f "$cmd_err_log"; else cmdErr='NA'; fi
496498
super_ocf_log debug "DBG: RA ==== action HANA_CALL (cmd is '$cmd', rc is '$rc', stderr from su is '$suErr', stderr from cmd is '$cmdErr') ===="
497499
# on rc=1 - retry to improve the behavior in AD environments
498500
# fh 20230127 deactivate this part. rc=1 could also be the valid rc of the called command

ra/saphana-controller-common-lib

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
# License: GNU General Public License (GPL)
1212
# Copyright: (c) 2013,2014 SUSE Linux Products GmbH
13-
# Copyright: (c) 2015-2023 SUSE LLC
13+
# Copyright: (c) 2015-2024 SUSE LLC
1414
#
1515
# An example usage:
1616
# See usage() function below for more details...
@@ -32,7 +32,7 @@
3232
# systemReplicationStatus.py (>= SPS090)
3333
#
3434
#######################################################################
35-
# SAPHanaControllerLibVersion="1.001.10"
35+
# SAPHanaControllerLibVersion="1.2.7"
3636
#######################################################################
3737
#
3838
# KNOWN PROBLEMS TO BE FIXED:

ra/saphana-controller-lib

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
# License: GNU General Public License (GPL)
1212
# Copyright: (c) 2013,2014 SUSE Linux Products GmbH
13-
# Copyright: (c) 2015-2023 SUSE LLC
13+
# Copyright: (c) 2015-2024 SUSE LLC
1414
#
1515
# An example usage:
1616
# See usage() function below for more details...
@@ -34,7 +34,7 @@
3434
#######################################################################
3535
# TODO PRIO2: NG - use SAPHanaControllerLibVersion=
3636
# shellcheck disable=SC2034
37-
SAPHanaControllerLibVersion="1.001.20"
37+
SAPHanaControllerLibVersion="1.2.7"
3838
#######################################################################
3939
#
4040
# KNOWN PROBLEMS TO BE FIXED:

ra/saphana-filesystem-lib

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Author: Fabian Herschel, February 2023
99
1010
# License: GNU General Public License (GPL)
11-
# Copyright: (c) 2023 SUSE LLC
11+
# Copyright: (c) 2023-2024 SUSE LLC
1212
#
1313
# An example usage:
1414
# See usage() function below for more details...

ra/saphana-topology-lib

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# License: GNU General Public License (GPL)
1111
# Copyright: (c) 2014 SUSE Linux Products GmbH
1212
# (c) 2015-2016 SUSE Linux GmbH
13-
# (c) 2017-2023 SUSE LLC
13+
# (c) 2017-2024 SUSE LLC
1414
#
1515
# An example usage:
1616
# See usage() function below for more details...
@@ -22,7 +22,7 @@
2222
#
2323
#######################################################################
2424
#
25-
saphana_topology_lib_version="1.001.3"
25+
saphana_topology_lib_version="1.2.7"
2626
#
2727
#######################################################################
2828

tools/SAPHanaSR-upgrade-to-angi-demo

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#
1313
# define parameters and functions
1414
#
15-
VERSION="2024-03-20 0.3"
15+
VERSION="2024-05-06 0.3"
1616
DRYRUN=yes
1717
# TODO DRYRUN=no
1818
EXE=$(basename $0)
@@ -23,7 +23,7 @@ ALL_RC=0
2323
# TODO how to use templates from package SAPHanaSR-angi?
2424
CIB_MSTTMP_ANG="#
2525
primitive rsc_SAPHanaCon_@@sid@@_HDB@@ino@@ ocf:suse:SAPHanaController \
26-
op start interval=0 timeout3600 \
26+
op start interval=0 timeout=3600 \
2727
op stop interval=0 timeout=3600 \
2828
op promote interval=0 timeout=900 \
2929
op demote interval=0 timeout=320 \
@@ -33,7 +33,7 @@ primitive rsc_SAPHanaCon_@@sid@@_HDB@@ino@@ ocf:suse:SAPHanaController \
3333
DUPLICATE_PRIMARY_TIMEOUT=7200 AUTOMATED_REGISTER=true \
3434
meta maintenance=true
3535
#
36-
clone @@mstnew@@ rsc_SAPHanaCon_@@sid@@_HDB@@ino@@ \
36+
clone @@mstnew@@ rsc_SAPHanaCon_@@sid@@_HDB"@@ino@@" \
3737
meta clone-node-max=1 promotable=true interleave=true maintenance=true
3838
#
3939
order ord_SAPHanaTop_first Optional: @@clntop@@ @@mstnew@@
@@ -50,8 +50,6 @@ primitive rsc_SAPHanaTop_@@sid@@_HDB@@ino@@ ocf:suse:SAPHanaTopology \
5050
#
5151
clone @@clntop@@ rsc_SAPHanaTop_@@sid@@_HDB@@ino@@ \
5252
meta clone-node-max=1 interleave=true
53-
#
54-
order ord_SAPHanaTop_first Optional: @@clntop@@ @@mstnew@@
5553
#"
5654

5755
CIB_CLNTMP_FIL="#
@@ -378,6 +376,7 @@ function f_add-saphanatop-angi() {
378376
EXE=$(basename $0)
379377
source /run/$EXE.variables
380378
[ -z $sid ] && sid=${SID,,}
379+
[ -z $CLNTOP ] && CLNTOP=${CLNNEW}
381380
wait-idle
382381
echo -n "echo \""
383382
echo -n $CIB_CLNTMP_ANG |\
@@ -404,6 +403,7 @@ function f_add-saphanacon-angi() {
404403
EXE=$(basename $0)
405404
source /run/$EXE.variables
406405
[ -z $sid ] && sid=${SID,,}
406+
[ -z $RSCIPA ] && RSCIPA=rsc_ip_${SID}_HDB${INO}
407407
wait-idle
408408
echo -n "echo \""
409409
echo -n $CIB_MSTTMP_ANG |\

0 commit comments

Comments
 (0)