Blame SOURCES/bz1449681-2-saphana-saphanatopology-update-0.152.21.patch

15862b
diff -uNr a/heartbeat/SAPHana b/heartbeat/SAPHana
15862b
--- a/heartbeat/SAPHana	2017-06-02 11:44:30.345894798 +0200
15862b
+++ b/heartbeat/SAPHana	2017-06-02 11:45:15.622450739 +0200
15862b
@@ -545,6 +545,9 @@
15862b
             read rolePatt syncPatt score <<< $scan
15862b
             if grep "$rolePatt" <<< "$roles"; then
15862b
                if grep "$syncPatt" <<< "$sync"; then
15862b
+                  super_ocf_log info "SCORE: scoring_crm_master: roles($roles) are matching pattern ($rolePatt)"
15862b
+                  super_ocf_log info "SCORE: scoring_crm_master: sync($sync) is  matching syncPattern ($syncPatt)"
15862b
+                  super_ocf_log info "SCORE: scoring_crm_master: set score $score"
15862b
                   skip=1
15862b
                   myScore=$score
15862b
                fi
15862b
@@ -1435,6 +1438,10 @@
15862b
                     lpa_set_lpt $LPTloc $NODENAME
15862b
                     ;;
15862b
             esac
15862b
+            if [ -z "$my_role" ]; then
15862b
+                my_role=$(get_hana_attribute ${NODENAME} ${ATTR_NAME_HANA_ROLES[@]})
15862b
+            fi
15862b
+            super_ocf_log info "SCORE: saphana_start_primary: scoring_crm_master($my_role,$my_sync)" 
15862b
             scoring_crm_master "$my_role" "$my_sync"
15862b
             ;;
15862b
         register ) # process a REGISTER
15862b
@@ -2129,6 +2136,7 @@
15862b
                         #super_ocf_log info "DEC: PreferSiteTakeover selected so decrease promotion score here"
15862b
                         my_role=$(get_hana_attribute ${NODENAME} ${ATTR_NAME_HANA_ROLES[@]})
15862b
                         my_sync=$(get_hana_attribute ${NODENAME} ${ATTR_NAME_HANA_SYNC_STATUS[@]})
15862b
+                        super_ocf_log info "SCORE: saphana_monitor_primary: scoring_crm_master($my_role,$my_sync)" 
15862b
                         scoring_crm_master "$my_role" "$my_sync"
15862b
                         rc=$OCF_FAILED_MASTER
15862b
                     fi
15862b
@@ -2191,6 +2199,7 @@
15862b
                           ;;
15862b
                    esac
15862b
                 fi
15862b
+                super_ocf_log info "SCORE: saphana_monitor_primary: scoring_crm_master($my_role,$my_sync)" 
15862b
                 scoring_crm_master "$my_role" "$my_sync"
15862b
             fi
15862b
             ;;
15862b
@@ -2301,6 +2310,7 @@
15862b
                     super_ocf_log info "DEC: secondary with sync status SOK ==> possible takeover node"
15862b
                     my_role=$(get_hana_attribute ${NODENAME} ${ATTR_NAME_HANA_ROLES[@]})
15862b
                     my_sync=$(get_hana_attribute ${NODENAME} ${ATTR_NAME_HANA_SYNC_STATUS[@]})
15862b
+                    super_ocf_log info "SCORE: saphana_monitor_secondary: scoring_crm_master($my_role,$my_sync)" 
15862b
                     scoring_crm_master "$my_role" "$my_sync"
15862b
                     ;;
15862b
                 "SFAIL" ) # This is currently NOT a possible node to promote