From 75e49f298c8d88fe98852a635f4bfb34f6bb5065 Mon Sep 17 00:00:00 2001 From: lpinne Date: Thu, 25 Apr 2024 13:48:45 +0200 Subject: [PATCH 1/7] ./ocf_suse_SAPHanaFilesystem.7: fixed description for secondary site --- man/ocf_suse_SAPHanaFilesystem.7 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/man/ocf_suse_SAPHanaFilesystem.7 b/man/ocf_suse_SAPHanaFilesystem.7 index 854d866a..8363bb3d 100644 --- a/man/ocf_suse_SAPHanaFilesystem.7 +++ b/man/ocf_suse_SAPHanaFilesystem.7 @@ -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. @@ -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 @@ -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 From 44d780ba7c8a2baf3df99d66064f2ef1d4faa318 Mon Sep 17 00:00:00 2001 From: Fabian Herschel Date: Mon, 6 May 2024 12:19:15 +0200 Subject: [PATCH 2/7] .gitignore (added misc) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 795161d9..8b6a77a5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ osc ibs test.log +misc From 2e46348f6004a42c2e803091aa7a6acadaab350e Mon Sep 17 00:00:00 2001 From: Fabian Herschel Date: Mon, 6 May 2024 12:21:36 +0200 Subject: [PATCH 3/7] angi package: set all version strings to 1.2.7 and updating copyright for 2024 --- SAPHanaSR-angi.spec | 2 +- ra/SAPHanaController | 4 ++-- ra/SAPHanaFilesystem | 4 ++-- ra/SAPHanaTopology | 4 ++-- ra/saphana-common-lib | 4 ++-- ra/saphana-controller-common-lib | 4 ++-- ra/saphana-controller-lib | 4 ++-- ra/saphana-filesystem-lib | 2 +- ra/saphana-topology-lib | 4 ++-- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/SAPHanaSR-angi.spec b/SAPHanaSR-angi.spec index 4f1954d5..62a336be 100644 --- a/SAPHanaSR-angi.spec +++ b/SAPHanaSR-angi.spec @@ -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/ diff --git a/ra/SAPHanaController b/ra/SAPHanaController index 3d0519d3..bb4502f7 100755 --- a/ra/SAPHanaController +++ b/ra/SAPHanaController @@ -14,7 +14,7 @@ # Support: linux@sap.com # 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... @@ -36,7 +36,7 @@ # systemReplicationStatus.py # ####################################################################### -SAPHanaControllerVersion="1.001.7" +SAPHanaControllerVersion="1.2.7" # # Initialization: timeB=$(date '+%s') diff --git a/ra/SAPHanaFilesystem b/ra/SAPHanaFilesystem index 89bd37b3..9ea34e0e 100755 --- a/ra/SAPHanaFilesystem +++ b/ra/SAPHanaFilesystem @@ -10,7 +10,7 @@ # Author: Fabian Herschel, February 2023 # Support: linux@sap.com # 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... @@ -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') diff --git a/ra/SAPHanaTopology b/ra/SAPHanaTopology index 2b5b265f..0adfc99b 100755 --- a/ra/SAPHanaTopology +++ b/ra/SAPHanaTopology @@ -14,7 +14,7 @@ # Support: linux@sap.com # 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... @@ -32,7 +32,7 @@ # systemReplicationStatus.py # ####################################################################### -SAPHanaTopologyVersion="1.001.7" +SAPHanaTopologyVersion="1.2.7" # # Initialization: timeB=$(date '+%s') diff --git a/ra/saphana-common-lib b/ra/saphana-common-lib index 1078b9ce..d7993c00 100755 --- a/ra/saphana-common-lib +++ b/ra/saphana-common-lib @@ -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... @@ -23,7 +23,7 @@ # ####################################################################### # -saphana_common_lib_version="1.001.1" +saphana_common_lib_version="1.2.7" # ####################################################################### diff --git a/ra/saphana-controller-common-lib b/ra/saphana-controller-common-lib index 8ea831a4..11055fdd 100755 --- a/ra/saphana-controller-common-lib +++ b/ra/saphana-controller-common-lib @@ -10,7 +10,7 @@ # Support: linux@sap.com # 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... @@ -32,7 +32,7 @@ # systemReplicationStatus.py (>= SPS090) # ####################################################################### -# SAPHanaControllerLibVersion="1.001.10" +# SAPHanaControllerLibVersion="1.2.7" ####################################################################### # # KNOWN PROBLEMS TO BE FIXED: diff --git a/ra/saphana-controller-lib b/ra/saphana-controller-lib index bb53216f..235e7afe 100755 --- a/ra/saphana-controller-lib +++ b/ra/saphana-controller-lib @@ -10,7 +10,7 @@ # Support: linux@sap.com # 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... @@ -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: diff --git a/ra/saphana-filesystem-lib b/ra/saphana-filesystem-lib index 1dee3e1b..48c2fb8d 100755 --- a/ra/saphana-filesystem-lib +++ b/ra/saphana-filesystem-lib @@ -8,7 +8,7 @@ # Author: Fabian Herschel, February 2023 # Support: linux@sap.com # 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... diff --git a/ra/saphana-topology-lib b/ra/saphana-topology-lib index 59d6f4e7..9915c418 100755 --- a/ra/saphana-topology-lib +++ b/ra/saphana-topology-lib @@ -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... @@ -22,7 +22,7 @@ # ####################################################################### # -saphana_topology_lib_version="1.001.3" +saphana_topology_lib_version="1.2.7" # ####################################################################### From 71762602444853197dbc7f07231f20de68ba8f26 Mon Sep 17 00:00:00 2001 From: Fabian Herschel Date: Mon, 6 May 2024 12:34:01 +0200 Subject: [PATCH 4/7] angi: saphana-common-lib: improve code-style following PR 144 (which was against classic) --- ra/saphana-common-lib | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ra/saphana-common-lib b/ra/saphana-common-lib index d7993c00..fcd1cb02 100755 --- a/ra/saphana-common-lib +++ b/ra/saphana-common-lib @@ -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;; @@ -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 From 05db52b0eb64fbce1331ef66f44e01471b230d0d Mon Sep 17 00:00:00 2001 From: Fabian Herschel Date: Mon, 6 May 2024 14:19:26 +0200 Subject: [PATCH 5/7] angi: 1st try to migrate to node.js 20 (github actions) --- .github/workflows/ChecksAndLinters.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ChecksAndLinters.yml b/.github/workflows/ChecksAndLinters.yml index cd296edb..63e490a8 100644 --- a/.github/workflows/ChecksAndLinters.yml +++ b/.github/workflows/ChecksAndLinters.yml @@ -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" From 4aa2b6ee642ed9aec084cbb19bb7013a7d19c2d2 Mon Sep 17 00:00:00 2001 From: Fabian Herschel Date: Mon, 6 May 2024 14:28:05 +0200 Subject: [PATCH 6/7] angi: re-apply shellcheck compatibility (lost be cross-porting PR144) --- ra/saphana-common-lib | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ra/saphana-common-lib b/ra/saphana-common-lib index fcd1cb02..2b533de3 100755 --- a/ra/saphana-common-lib +++ b/ra/saphana-common-lib @@ -492,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 - 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 + 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 From 33b5e9cbbe93fde47143192092bc20ee43819c95 Mon Sep 17 00:00:00 2001 From: Fabian Herschel Date: Mon, 6 May 2024 17:19:08 +0200 Subject: [PATCH 7/7] angi: SAPHanaSR-upgrade-to-angi-demo crossport from classic --- tools/SAPHanaSR-upgrade-to-angi-demo | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/SAPHanaSR-upgrade-to-angi-demo b/tools/SAPHanaSR-upgrade-to-angi-demo index 8242c0e5..e6c4aec0 100755 --- a/tools/SAPHanaSR-upgrade-to-angi-demo +++ b/tools/SAPHanaSR-upgrade-to-angi-demo @@ -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) @@ -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 \ @@ -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@@ @@ -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="# @@ -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 |\ @@ -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 |\