Skip to content

Commit

Permalink
Merge pull request #253 from fmherschel/angi-devel
Browse files Browse the repository at this point in the history
Angi verison 1.2.7
  • Loading branch information
fmherschel authored May 6, 2024
2 parents 6584442 + 33b5e9c commit b1f3168
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ChecksAndLinters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
osc
ibs
test.log
misc
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.6
Version: 1.2.7
Release: 0
Url: https://www.suse.com/c/fail-safe-operation-of-sap-hana-suse-extends-its-high-availability-solution/

Expand Down
10 changes: 4 additions & 6 deletions man/ocf_suse_SAPHanaFilesystem.7
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" Version: 1.001
.\"
.TH ocf_suse_SAPHanaFilesystem 7 "13 Dec 2023" "" "OCF resource agents"
.TH ocf_suse_SAPHanaFilesystem 7 "24 Apr 2024" "" "OCF resource agents"
.\"
.SH NAME
SAPHanaFilesystem \- Monitors mounted SAP HANA filesystems.
Expand Down Expand Up @@ -33,10 +33,8 @@ migration-threshold is reached.
.PP
* Behaviour on HANA secondary sites
.PP
In case of monitor failure the Linux cluster tries to stop and restart the
SAPHanaFilesystem resource (not the real filesystem). This will be repeated until
it gains success or migration-threshold is reached.
.\" TODO migration-threshold?
In case of monitor failure the Linux cluster is not informed by SAPHanaFilesystem
resource agent.
.PP
* Background information
.PP
Expand Down Expand Up @@ -457,7 +455,7 @@ F.Herschel, L.Pinne.
.\"
.SH COPYRIGHT
.br
(c) 2023 SUSE LLC
(c) 2023-2024 SUSE LLC
.br
SAPHanaFilesystem comes with ABSOLUTELY NO WARRANTY.
.br
Expand Down
4 changes: 2 additions & 2 deletions ra/SAPHanaController
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Support: [email protected]
# License: GNU General Public License (GPL)
# Copyright: (c) 2013,2014 SUSE Linux Products GmbH
# (c) 2015-2023 SUSE LLC
# (c) 2015-2024 SUSE LLC
#
# An example usage:
# See usage() function below for more details...
Expand All @@ -36,7 +36,7 @@
# systemReplicationStatus.py
#
#######################################################################
SAPHanaControllerVersion="1.001.7"
SAPHanaControllerVersion="1.2.7"
#
# Initialization:
timeB=$(date '+%s')
Expand Down
4 changes: 2 additions & 2 deletions ra/SAPHanaFilesystem
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Author: Fabian Herschel, February 2023
# Support: [email protected]
# License: GNU General Public License (GPL)
# Copyright: (c) 2023 SUSE LLC
# Copyright: (c) 2023-2024 SUSE LLC
#
# An example usage:
# See usage() function below for more details...
Expand All @@ -21,7 +21,7 @@
# OCF_RESKEY_DIR_EXECUTABLE (optional, well known directories will be searched by default)
#
#######################################################################
SAPHanaFilesystemVersion="0.3.0"
SAPHanaFilesystemVersion="1.2.7"
#
# Initialization:
timeB=$(date '+%s')
Expand Down
4 changes: 2 additions & 2 deletions ra/SAPHanaTopology
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Support: [email protected]
# License: GNU General Public License (GPL)
# Copyright: (c) 2014 SUSE Linux Products GmbH
# (c) 2015-2023 SUSE LLC
# (c) 2015-2024 SUSE LLC
#
# An example usage:
# See usage() function below for more details...
Expand All @@ -32,7 +32,7 @@
# systemReplicationStatus.py
#
#######################################################################
SAPHanaTopologyVersion="1.001.7"
SAPHanaTopologyVersion="1.2.7"
#
# Initialization:
timeB=$(date '+%s')
Expand Down
12 changes: 7 additions & 5 deletions ra/saphana-common-lib
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# License: GNU General Public License (GPL)
# Copyright: (c) 2014 SUSE Linux Products GmbH
# (c) 2015-2016 SUSE Linux GmbH
# (c) 2017-2023 SUSE LLC
# (c) 2017-2024 SUSE LLC
#
# An example usage:
# See usage() function below for more details...
Expand All @@ -23,7 +23,7 @@
#
#######################################################################
#
saphana_common_lib_version="1.001.1"
saphana_common_lib_version="1.2.7"
#
#######################################################################

Expand Down Expand Up @@ -437,6 +437,8 @@ function HANA_CALL() {
local cmd=""
local pre_script=""
local output=""
local suErr=""
local cmdErr=""
while [ $# -gt 0 ]; do
case "$1" in
--timeout ) timeOut=$2; shift;;
Expand Down Expand Up @@ -490,9 +492,9 @@ function HANA_CALL() {
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="$?"
;;
esac
output=$(if [ -f "$cmd_out_log" ]; then cat "$cmd_out_log"; rm -f "$cmd_out_log"; fi)
suErr=$(if [ -f "$su_err_log" ]; then cat "$su_err_log"; rm -f "$su_err_log"; else echo "NA"; fi)
cmdErr=$(if [ -f "$cmd_err_log" ]; then cat "$cmd_err_log"; rm -f "$cmd_err_log"; else echo "NA"; fi)
if [[ -f "$cmd_out_log" ]]; then output=$(<"$cmd_out_log"); rm -f "$cmd_out_log"; fi
if [[ -f "$su_err_log" ]]; then suErr=$(<"$su_err_log"); rm -f "$su_err_log"; else suErr='NA'; fi
if [[ -f "$cmd_err_log" ]]; then cmdErr=$(<"$cmd_err_log"); rm -f "$cmd_err_log"; else cmdErr='NA'; fi
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') ===="
# on rc=1 - retry to improve the behavior in AD environments
# fh 20230127 deactivate this part. rc=1 could also be the valid rc of the called command
Expand Down
4 changes: 2 additions & 2 deletions ra/saphana-controller-common-lib
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Support: [email protected]
# License: GNU General Public License (GPL)
# Copyright: (c) 2013,2014 SUSE Linux Products GmbH
# Copyright: (c) 2015-2023 SUSE LLC
# Copyright: (c) 2015-2024 SUSE LLC
#
# An example usage:
# See usage() function below for more details...
Expand All @@ -32,7 +32,7 @@
# systemReplicationStatus.py (>= SPS090)
#
#######################################################################
# SAPHanaControllerLibVersion="1.001.10"
# SAPHanaControllerLibVersion="1.2.7"
#######################################################################
#
# KNOWN PROBLEMS TO BE FIXED:
Expand Down
4 changes: 2 additions & 2 deletions ra/saphana-controller-lib
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Support: [email protected]
# License: GNU General Public License (GPL)
# Copyright: (c) 2013,2014 SUSE Linux Products GmbH
# Copyright: (c) 2015-2023 SUSE LLC
# Copyright: (c) 2015-2024 SUSE LLC
#
# An example usage:
# See usage() function below for more details...
Expand All @@ -34,7 +34,7 @@
#######################################################################
# TODO PRIO2: NG - use SAPHanaControllerLibVersion=
# shellcheck disable=SC2034
SAPHanaControllerLibVersion="1.001.20"
SAPHanaControllerLibVersion="1.2.7"
#######################################################################
#
# KNOWN PROBLEMS TO BE FIXED:
Expand Down
2 changes: 1 addition & 1 deletion ra/saphana-filesystem-lib
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Author: Fabian Herschel, February 2023
# Support: [email protected]
# License: GNU General Public License (GPL)
# Copyright: (c) 2023 SUSE LLC
# Copyright: (c) 2023-2024 SUSE LLC
#
# An example usage:
# See usage() function below for more details...
Expand Down
4 changes: 2 additions & 2 deletions ra/saphana-topology-lib
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# License: GNU General Public License (GPL)
# Copyright: (c) 2014 SUSE Linux Products GmbH
# (c) 2015-2016 SUSE Linux GmbH
# (c) 2017-2023 SUSE LLC
# (c) 2017-2024 SUSE LLC
#
# An example usage:
# See usage() function below for more details...
Expand All @@ -22,7 +22,7 @@
#
#######################################################################
#
saphana_topology_lib_version="1.001.3"
saphana_topology_lib_version="1.2.7"
#
#######################################################################

Expand Down
10 changes: 5 additions & 5 deletions tools/SAPHanaSR-upgrade-to-angi-demo
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
# define parameters and functions
#
VERSION="2024-03-20 0.3"
VERSION="2024-05-06 0.3"
DRYRUN=yes
# TODO DRYRUN=no
EXE=$(basename $0)
Expand All @@ -23,7 +23,7 @@ ALL_RC=0
# TODO how to use templates from package SAPHanaSR-angi?
CIB_MSTTMP_ANG="#
primitive rsc_SAPHanaCon_@@sid@@_HDB@@ino@@ ocf:suse:SAPHanaController \
op start interval=0 timeout3600 \
op start interval=0 timeout=3600 \
op stop interval=0 timeout=3600 \
op promote interval=0 timeout=900 \
op demote interval=0 timeout=320 \
Expand All @@ -33,7 +33,7 @@ primitive rsc_SAPHanaCon_@@sid@@_HDB@@ino@@ ocf:suse:SAPHanaController \
DUPLICATE_PRIMARY_TIMEOUT=7200 AUTOMATED_REGISTER=true \
meta maintenance=true
#
clone @@mstnew@@ rsc_SAPHanaCon_@@sid@@_HDB@@ino@@ \
clone @@mstnew@@ rsc_SAPHanaCon_@@sid@@_HDB"@@ino@@" \
meta clone-node-max=1 promotable=true interleave=true maintenance=true
#
order ord_SAPHanaTop_first Optional: @@clntop@@ @@mstnew@@
Expand All @@ -50,8 +50,6 @@ primitive rsc_SAPHanaTop_@@sid@@_HDB@@ino@@ ocf:suse:SAPHanaTopology \
#
clone @@clntop@@ rsc_SAPHanaTop_@@sid@@_HDB@@ino@@ \
meta clone-node-max=1 interleave=true
#
order ord_SAPHanaTop_first Optional: @@clntop@@ @@mstnew@@
#"

CIB_CLNTMP_FIL="#
Expand Down Expand Up @@ -378,6 +376,7 @@ function f_add-saphanatop-angi() {
EXE=$(basename $0)
source /run/$EXE.variables
[ -z $sid ] && sid=${SID,,}
[ -z $CLNTOP ] && CLNTOP=${CLNNEW}
wait-idle
echo -n "echo \""
echo -n $CIB_CLNTMP_ANG |\
Expand All @@ -404,6 +403,7 @@ function f_add-saphanacon-angi() {
EXE=$(basename $0)
source /run/$EXE.variables
[ -z $sid ] && sid=${SID,,}
[ -z $RSCIPA ] && RSCIPA=rsc_ip_${SID}_HDB${INO}
wait-idle
echo -n "echo \""
echo -n $CIB_MSTTMP_ANG |\
Expand Down

0 comments on commit b1f3168

Please sign in to comment.