Hello community,

here is the log from the commit of package cluster-glue for openSUSE:Factory 
checked in at 2015-08-17 17:25:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cluster-glue (Old)
 and      /work/SRC/openSUSE:Factory/.cluster-glue.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cluster-glue"

Changes:
--------
--- /work/SRC/openSUSE:Factory/cluster-glue/cluster-glue.changes        
2015-05-20 23:23:09.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cluster-glue.new/cluster-glue.changes   
2015-08-17 17:25:39.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Aug 14 11:34:28 UTC 2015 - [email protected]
+
+- high: hb_report: Prefer pacemaker.log if it exists (bsc#941681)
+- Add 0002-high-hb_report-Prefer-pacemaker.log-if-it-exists-bsc.patch 
+
+-------------------------------------------------------------------

New:
----
  0002-high-hb_report-Prefer-pacemaker.log-if-it-exists-bsc.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cluster-glue.spec ++++++
--- /var/tmp/diff_new_pack.2eMiQX/_old  2015-08-17 17:25:40.000000000 +0200
+++ /var/tmp/diff_new_pack.2eMiQX/_new  2015-08-17 17:25:40.000000000 +0200
@@ -54,6 +54,8 @@
 Patch5:         0001-high-hb_report-Collect-logs-from-journald-boo-900654.patch
 # PATCH-FIX-OPENSUSE: fix build with GCC 5
 Patch6:         cluster-glue-gcc5.patch
+# PATCH-FIX-OPENSUSE: high: hb_report: Prefer pacemaker.log if it exists 
(bsc#941681)
+Patch7:         0002-high-hb_report-Prefer-pacemaker.log-if-it-exists-bsc.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  OpenIPMI-devel
 BuildRequires:  asciidoc
@@ -162,6 +164,7 @@
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 ###########################################################
 
 %build

++++++ 0002-high-hb_report-Prefer-pacemaker.log-if-it-exists-bsc.patch ++++++
>From 35faa72ad8a5269fe60960574bcea114b57c9a78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <[email protected]>
Date: Fri, 14 Aug 2015 13:33:20 +0200
Subject: [PATCH 2/2] high: hb_report: Prefer pacemaker.log if it exists
 (bsc#941681)

---
 hb_report/hb_report.in | 34 +++++++++++++++++++---------------
 hb_report/utillib.sh   | 24 +++++++++++++++++-------
 2 files changed, 36 insertions(+), 22 deletions(-)

diff --git a/hb_report/hb_report.in b/hb_report/hb_report.in
index df94f39..6c7b074 100755
--- a/hb_report/hb_report.in
+++ b/hb_report/hb_report.in
@@ -164,7 +164,8 @@ setvarsanddefaults() {
        # logs to collect in addition
        # NB: they all have to be in syslog format
        #
-       EXTRA_LOGS="/var/log/messages"
+       EXTRA_LOGS="/var/log/messages /var/log/pacemaker.log"
+       PCMK_LOG="/var/log/pacemaker.log"
        # used only by the master
        NO_SSH=""
        SSH_USER=""
@@ -308,19 +309,29 @@ logmark() {
 #
 findlog() {
        local logf=""
-       collect_journal $FROM_TIME $TO_TIME $WORKDIR/$JOURNAL_F
+       if [ -f "$PCMK_LOG" ]; then
+               echo $PCMK_LOG
+               return
+       fi
+
        if [ "$HA_LOGFACILITY" ]; then
                logf=`findmsg $UNIQUE_MSG | awk '{print $1}'`
        fi
        if [ -f "$logf" ]; then
                echo $logf
-       elif [ -f "$WORKDIR/$JOURNAL_F" ]; then
+               return
+       fi
+
+
+       collect_journal $FROM_TIME $TO_TIME $WORKDIR/$JOURNAL_F
+       if [ -f "$WORKDIR/$JOURNAL_F" ]; then
                echo $WORKDIR/$JOURNAL_F
-       else
-               echo ${HA_DEBUGFILE:-$HA_LOGFILE}
-               [ "${HA_DEBUGFILE:-$HA_LOGFILE}" ] &&
-                       debug "will try with ${HA_DEBUGFILE:-$HA_LOGFILE}"
+               return
        fi
+
+       echo ${HA_DEBUGFILE:-$HA_LOGFILE}
+       [ "${HA_DEBUGFILE:-$HA_LOGFILE}" ] &&
+               debug "will try with ${HA_DEBUGFILE:-$HA_LOGFILE}"
 }
 
 #
@@ -537,12 +548,12 @@ USER_NODES="$USER_NODES"
 NODES="$NODES"
 MASTER_NODE="$MASTER_NODE"
 HA_LOG=$HA_LOG
-MASTER_IS_HOSTLOG=$MASTER_IS_HOSTLOG
 UNIQUE_MSG=$UNIQUE_MSG
 SANITIZE="$SANITIZE"
 DO_SANITIZE="$DO_SANITIZE"
 SKIP_LVL="$SKIP_LVL"
 EXTRA_LOGS="$EXTRA_LOGS"
+PCMK_LOG="$PCMK_LOG"
 USER_CLUSTER_TYPE="$USER_CLUSTER_TYPE"
 CONF="$CONF"
 B_CONF="$B_CONF"
@@ -1055,7 +1066,6 @@ pickcompress() {
 }
 # get the right part of the log
 getlog() {
-       local cnt
        local outf
        outf=$WORKDIR/$HALOG_F
 
@@ -1068,8 +1078,6 @@ getlog() {
        fi
        if [ "$HA_LOG" = "" ]; then
                HA_LOG=`findlog`
-               [ "$HA_LOG" ] &&
-                       cnt=`fgrep -c $UNIQUE_MSG < $HA_LOG`
        fi
        if [ "$HA_LOG" = "" -o ! -f "$HA_LOG" ]; then
                if [ "$CTS" ]; then
@@ -1079,10 +1087,6 @@ getlog() {
                fi
                return
        fi
-       if [ "$cnt" ] && [ $cnt -gt 1 -a $cnt -eq $NODECNT ]; then
-               MASTER_IS_HOSTLOG=1
-               info "found the central log!"
-       fi
 
        if [ "$NO_str2time" ]; then
                warning "a log found; but we cannot slice it"
diff --git a/hb_report/utillib.sh b/hb_report/utillib.sh
index b059ab1..0914604 100644
--- a/hb_report/utillib.sh
+++ b/hb_report/utillib.sh
@@ -131,13 +131,23 @@ findmsg() {
        favourites="ha-*"
        mark=$1
        log=""
-       for d in $syslogdirs; do
-               [ -d $d ] || continue
-               log=`grep -l -e "$mark" $d/$favourites` && break
-               test "$log" && break
-               log=`grep -l -e "$mark" $d/*` && break
-               test "$log" && break
-       done 2>/dev/null
+
+       if [ -f /var/log/pacemaker.log ]; then
+               log=`grep -l -e "$mark" /var/log/pacemaker.log`
+               if [ ! "$log" ]; then
+                       log=`grep -l -e "$mark" /var/log/pacemaker.log*` && 
break
+               fi
+       fi
+
+       if [ ! "$log" ]; then
+               for d in $syslogdirs; do
+                       [ -d $d ] || continue
+                       log=`grep -l -e "$mark" $d/$favourites` && break
+                       test "$log" && break
+                       log=`grep -l -e "$mark" $d/*` && break
+                       test "$log" && break
+               done 2>/dev/null
+       fi
        [ "$log" ] &&
                ls -t $log | tr '\n' ' '
        [ "$log" ] &&
-- 
2.1.4


Reply via email to