File 0001-bsc-1192963.patch of Package SAPHanaSR.26305
From 9c29de4c1d37c68401d870ddb6303d218c3ced99 Mon Sep 17 00:00:00 2001
From: Yadan Fan <ydfan@suse.com>
Date: Wed, 1 Dec 2021 14:38:22 +0100
Subject: [PATCH] SAPHanaSRTools.pm: bsc#1192963: fixing scanning of attribute ids
---
test/SAPHanaSRTools.pm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/SAPHanaSRTools.pm b/test/SAPHanaSRTools.pm
index 01f6430..ce35fd1 100644
--- a/test/SAPHanaSRTools.pm
+++ b/test/SAPHanaSRTools.pm
@@ -271,7 +271,11 @@ while (<$CIB>) {
#}
if ( $_ =~ /nvpair.*name="([a-zA-Z0-9\_\-]+_${sid}_([a-zA-Z0-9\-\_]+))"/ ) {
$name=$1;
- if ( $_ =~ /id=.(status|nodes)-([a-zA-Z0-9\_\-]+)-/ ) {
+ # Bug 1192963 - L3: SAPHanaSR-monitor not reporting correctly
+ # - catch also ids: id="host15-instance_attributes-hana_ha1_srmode"
+ #
+ if (( $_ =~ /id=.((.*)-instance_attributes)-([a-zA-Z0-9\_\-]+)/ )
+ || ( $_ =~ /id=.(status|nodes)-([a-zA-Z0-9\_\-]+)-/ )) {
# found attribute in nodes forever and reboot store
$host=$2;
if (defined $id2uname{$host}) {
--
2.26.2