Blame SOURCES/bz1168251-SAPHana-agents-update.patch

261ad6
diff --git a/heartbeat/SAPHana b/heartbeat/SAPHana
261ad6
index f4db17a..412152b 100644
261ad6
--- a/heartbeat/SAPHana
261ad6
+++ b/heartbeat/SAPHana
261ad6
@@ -137,7 +137,7 @@ function saphana_meta_data() {
261ad6
 <shortdesc lang="en">Manages two SAP HANA instances in system replication (SR).</shortdesc>
261ad6
 <longdesc lang="en">
261ad6
 The SAPHanaSR resource agent manages two SAP Hana instances (databases) which are configured
261ad6
-in system replication. This first version is limitted to the scale-up scenario. Scale-Up is
261ad6
+in system replication. This first version is limitted to the scale-up scenario. Scale-Out is
261ad6
 not supported in this version.
261ad6
 
261ad6
 Managing the two SAP HANA instances means that the resource agent controls the start/stop of the
261ad6
@@ -231,7 +231,9 @@ The resource agent uses the following four interfaces provided by SAP:
261ad6
     <parameter name="SAPHanaFilter" unique="0" required="0">
261ad6
         <shortdesc lang="en">Define SAPHana resource agent messages to be printed</shortdesc>
261ad6
         <longdesc lang="en">Define SAPHana resource agent messages to be printed.
261ad6
-        This parameter should only be set of been requested by SUSE support. The default is sufficient for normal operation.
261ad6
+        This parameter should only be set if requested by support. The default is sufficient for normal operation.
261ad6
+        Values: ra-act-lpa-dec-flow
261ad6
+        You could specify any combination of the above values like "ra-act-flow"
261ad6
         </longdesc>
261ad6
         <content type="string" default="" />
261ad6
     </parameter>
261ad6
@@ -480,7 +482,7 @@ function get_crm_master()
261ad6
 # globals:  sr_name(w), remoteHost(w), otherNodes(w) 
261ad6
 # globals:  ATTR_NAME_HANA_SYNC_STATUS(w), ATTR_NAME_HANA_CLONE_STATE(w)
261ad6
 # globals:  DIR_EXECUTABLE(w), SAPSTARTSRV(w), SAPCONTROL(w), DIR_PROFILE(w), SAPSTARTPROFILE(w), LD_LIBRARY_PATH(w), PATH(w)
261ad6
-# globals:  LPA_DIRECTORY(w), SIDInstanceName(w), remoteNode(w)
261ad6
+# globals:  LPA_DIRECTORY(w), SIDInstanceName(w), remoteNode(w), hdbSrQueryTimeout(w)
261ad6
 # saphana_init : Define global variables with default values, if optional parameters are not set
261ad6
 #
261ad6
 function saphana_init() {
261ad6
@@ -497,6 +499,8 @@ function saphana_init() {
261ad6
     super_ocf_log debug "DBG: Used new method to get SID ($SID) and InstanceNr ($InstanceNr)"
261ad6
     sid=$(echo "$SID" | tr [:upper:] [:lower:])
261ad6
     sidadm="${sid}adm"
261ad6
+    # TODO PRIO3: Do we need a parameter for the RA to be able to adjust hdbSrQueryTimeout?
261ad6
+    hdbSrQueryTimeout=180
261ad6
     # DONE: PRIO4: SAPVIRHOST might be different to NODENAME
261ad6
     # DONE: PRIO1: ASK: Is the output format of ListInstances fix? Could we take that as an API? Answer: Yes
261ad6
     # try to catch:  Inst Info : LNX - 42 - lv9041 - 740, patch 36, changelist 1444691
261ad6
@@ -827,7 +831,7 @@ function analyze_hana_sync_status()
261ad6
         super_ocf_log err  "ACT: Secure store users are missing (see best practice manual how to setup the users)"
261ad6
         rc=$OCF_ERR_CONFIGURED
261ad6
     fi
261ad6
-    hana_sync_status=$(timeout 60 $DIR_EXECUTABLE/hdbsql -a -x -U $secUser  $query_state); sqlrc=$?
261ad6
+    hana_sync_status=$(timeout $hdbSrQueryTimeout $DIR_EXECUTABLE/hdbsql -a -x -U $secUser  $query_state); sqlrc=$?
261ad6
     hana_sync_status=$(echo $hana_sync_status | dequote)
261ad6
     super_ocf_log debug "DBG: hdbsql rc=$sqlrc hana_sync_status=\"$hana_sync_status\""
261ad6
     if [ "$sqlrc" -eq 0 -a "$hana_sync_status" != "" ]; then
261ad6
@@ -846,10 +850,10 @@ function analyze_hana_sync_status()
261ad6
         #    TODO: PRIO9: for first we assume there is only ONE secondary site (like ROT)
261ad6
         #    TODO: PRIO3: should we loop over all cluster nodes fetching their roles-attribute? To minimize sql-queries?
261ad6
         #
261ad6
-        all_secondary_hosts=$(timeout 60 hdbsql -a -x -U $secUser $query_secondaries ); sqlrc=$?
261ad6
+        all_secondary_hosts=$(timeout $hdbSrQueryTimeout hdbsql -a -x -U $secUser $query_secondaries ); sqlrc=$?
261ad6
         all_secondary_hosts=$(echo $all_secondary_hosts | dequote);
261ad6
         if [ "$sqlrc" -eq 0 ]; then
261ad6
-            all_broken_secondary_hosts=$(timeout 60 hdbsql -a -x -U $secUser $query_failed_secondaries); sqlrc=$?
261ad6
+            all_broken_secondary_hosts=$(timeout $hdbSrQueryTimeout hdbsql -a -x -U $secUser $query_failed_secondaries); sqlrc=$?
261ad6
             all_broken_secondary_hosts=$(echo $all_broken_secondary_hosts | dequote);
261ad6
             if  [ "$sqlrc" -eq 0 ]; then                 
261ad6
                  if [ -n "$all_broken_secondary_hosts" ]; then
261ad6
@@ -869,9 +873,9 @@ function analyze_hana_sync_status()
261ad6
             fi
261ad6
         fi                  
261ad6
     else
261ad6
-        # return codes 19: license error -> set SFAIL!
261ad6
         case "$sqlrc" in
261ad6
             19 ) 
261ad6
+                # return codes 19: license error -> set SFAIL!
261ad6
                 # DONE: PRIO1: We should NOT set SFAIL, if HDB is exactly broken now
261ad6
                 #       When HDB breaks during monitor this could prevent a prositive remote failover
261ad6
                 super_ocf_log warn "ACT: Was not able to fetch HANA SYNC STATUS - set sync status to SFAIL for ALL OTHER cluster hosts"
261ad6
diff --git a/heartbeat/SAPHanaTopology b/heartbeat/SAPHanaTopology
261ad6
index 19fbbb4..082ad29 100644
261ad6
--- a/heartbeat/SAPHanaTopology
261ad6
+++ b/heartbeat/SAPHanaTopology
261ad6
@@ -123,7 +123,7 @@ function sht_meta_data() {
261ad6
 
261ad6
 
261ad6
 <resource-agent name="SAPHanaTopology">
261ad6
-    <version>0.149.3</version>
261ad6
+    <version>0.149.4</version>
261ad6
     <shortdesc lang="en">Analyzes SAP HANA System Replication Topology.</shortdesc>
261ad6
     <longdesc lang="en">This RA analyzes the SAP HANA topology and "sends" all findings via the node status attributes to
261ad6
         all nodes in the cluster. These attributes are taken by the SAPHana RA to control the SAP Hana Databases.
261ad6
@@ -172,7 +172,7 @@ SAPHanaTopology scans the output table of landscapeHostConfiguration.py to ident
261ad6
         <shortdesc lang="en">Define type of SAPHanaTopology RA messages to be printed</shortdesc>
261ad6
         <longdesc lang="en">Define type of SAPHanaTopology RA messages to be printed. 
261ad6
 Define SAPHana resource agent messages to be printed.
261ad6
-        This parameter should only be set of been requested by SUSE support. The default is sufficient for normal operation.
261ad6
+        This parameter should only be set if requested by support. The default is sufficient for normal operation.
261ad6
         Values: ra-act-lpa-dec-flow
261ad6
         You could specify any combination of the above values like "ra-act-flow"
261ad6
         </longdesc>