Hello community,

here is the log from the commit of package crmsh for openSUSE:Factory checked 
in at 2015-08-15 11:39:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crmsh (Old)
 and      /work/SRC/openSUSE:Factory/.crmsh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "crmsh"

Changes:
--------
--- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes      2015-08-12 
15:15:14.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2015-08-15 
11:39:35.000000000 +0200
@@ -1,0 +2,10 @@
+Fri Aug 14 10:22:33 UTC 2015 - kgronl...@suse.com
+
+- Update to version 2.2.0~rc3+git.1439547680.0877a90:
+  + low: main: Bash completion didn't handle sudo correctly
+  + high: hb_report: Correct path to hb_report after move to subdirectory 
(bsc#936026)
+  + medium: report: Add pacemaker.log to find_node_log list (bsc#941734)
+  + high: hb_report: Prefer pacemaker.log if it exists (bsc#941681)
+  + high: report: Output format from pacemaker has changed (bsc#941681)
+
+-------------------------------------------------------------------

Old:
----
  crmsh-2.2.0~rc3+git.1439305144.fbe773c.tar.bz2

New:
----
  crmsh-2.2.0~rc3+git.1439547680.0877a90.tar.bz2

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

Other differences:
------------------
++++++ crmsh.spec ++++++
--- /var/tmp/diff_new_pack.T985lw/_old  2015-08-15 11:39:36.000000000 +0200
+++ /var/tmp/diff_new_pack.T985lw/_new  2015-08-15 11:39:36.000000000 +0200
@@ -36,7 +36,7 @@
 Summary:        High Availability cluster command-line interface
 License:        GPL-2.0+
 Group:          %{pkg_group}
-Version:        2.2.0~rc3+git.1439305144.fbe773c
+Version:        2.2.0~rc3+git.1439547680.0877a90
 Release:        0
 Url:            http://crmsh.github.io
 Source0:        %{name}-%{version}.tar.bz2

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.T985lw/_old  2015-08-15 11:39:36.000000000 +0200
+++ /var/tmp/diff_new_pack.T985lw/_new  2015-08-15 11:39:36.000000000 +0200
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
             <param name="url">git://github.com/ClusterLabs/crmsh.git</param>
-          <param 
name="changesrevision">fbe773c2828cf9147fc779a2aab7aa131eac1cfe</param></service></servicedata>
\ No newline at end of file
+          <param 
name="changesrevision">0877a90483d83aa98af93af0389701c8a22b01b3</param></service></servicedata>
\ No newline at end of file

++++++ crmsh-2.2.0~rc3+git.1439305144.fbe773c.tar.bz2 -> 
crmsh-2.2.0~rc3+git.1439547680.0877a90.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-2.2.0~rc3+git.1439305144.fbe773c/hb_report/hb_report.in 
new/crmsh-2.2.0~rc3+git.1439547680.0877a90/hb_report/hb_report.in
--- old/crmsh-2.2.0~rc3+git.1439305144.fbe773c/hb_report/hb_report.in   
2015-08-12 09:16:34.000000000 +0200
+++ new/crmsh-2.2.0~rc3+git.1439547680.0877a90/hb_report/hb_report.in   
2015-08-14 12:22:33.000000000 +0200
@@ -153,6 +153,7 @@
        # NB: they all have to be in syslog format
        #
        EXTRA_LOGS="/var/log/messages /var/log/pacemaker.log"
+       PCMK_LOG="/var/log/pacemaker.log"
        # used only by the master
        NO_SSH=""
        SSH_USER=""
@@ -294,19 +295,29 @@
 #
 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}"
 }
 
 #
@@ -523,12 +534,12 @@
 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"
@@ -552,11 +563,11 @@
        dumpenv |
        if [ "$node" = "$WE" ]; then
                debug "running: $LOCAL_SUDO hb_report __slave"
-               $LOCAL_SUDO ${datadir}/@PACKAGE_NAME@/hb_report __slave
+               $LOCAL_SUDO ${HA_NOARCHBIN}/hb_report __slave
        else
                debug "running: ssh $SSH_OPTS $node \"$SUDO hb_report __slave"
                ssh $SSH_OPTS $node \
-                       "$SUDO ${datadir}/@PACKAGE_NAME@/hb_report __slave"
+                       "$SUDO ${HA_NOARCHBIN}/hb_report __slave"
        fi | (cd $WORKDIR && tar xf -)
 }
 
@@ -730,7 +741,7 @@
 #
 sys_info() {
        cluster_info
-       ${datadir}/@PACKAGE_NAME@/hb_report -V # our info
+       ${HA_NOARCHBIN}/hb_report -V # our info
        echo "resource-agents: `grep 'Build version:' 
@OCF_ROOT_DIR@/lib/heartbeat/ocf-shellfuncs`"
        crm_info
        pkg_versions $PACKAGES
@@ -1037,7 +1048,6 @@
 }
 # get the right part of the log
 getlog() {
-       local cnt
        local outf
        outf=$WORKDIR/$HALOG_F
 
@@ -1050,8 +1060,6 @@
        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
@@ -1061,10 +1069,6 @@
                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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-2.2.0~rc3+git.1439305144.fbe773c/hb_report/utillib.sh 
new/crmsh-2.2.0~rc3+git.1439547680.0877a90/hb_report/utillib.sh
--- old/crmsh-2.2.0~rc3+git.1439305144.fbe773c/hb_report/utillib.sh     
2015-08-12 09:16:34.000000000 +0200
+++ new/crmsh-2.2.0~rc3+git.1439547680.0877a90/hb_report/utillib.sh     
2015-08-14 12:22:33.000000000 +0200
@@ -117,13 +117,23 @@
        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" ] &&
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-2.2.0~rc3+git.1439305144.fbe773c/modules/main.py 
new/crmsh-2.2.0~rc3+git.1439547680.0877a90/modules/main.py
--- old/crmsh-2.2.0~rc3+git.1439305144.fbe773c/modules/main.py  2015-08-12 
09:16:34.000000000 +0200
+++ new/crmsh-2.2.0~rc3+git.1439547680.0877a90/modules/main.py  2015-08-14 
12:22:33.000000000 +0200
@@ -269,14 +269,13 @@
 
     options.shell_completion = True
 
-    #point = int(args[0])
+    # point = int(args[0])
     line = args[1]
 
-    # remove crm from commandline
-    line_split = line.split(' ', 1)
-    if len(line_split) == 1:
-        return
-    line = line_split[1].lstrip()
+    # remove [*]crm from commandline
+    idx = line.find('crm')
+    if idx >= 0:
+        line = line[idx+3:].lstrip()
 
     options.interactive = False
     ui = ui_root.Root()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-2.2.0~rc3+git.1439305144.fbe773c/modules/report.py 
new/crmsh-2.2.0~rc3+git.1439547680.0877a90/modules/report.py
--- old/crmsh-2.2.0~rc3+git.1439305144.fbe773c/modules/report.py        
2015-08-12 09:16:34.000000000 +0200
+++ new/crmsh-2.2.0~rc3+git.1439547680.0877a90/modules/report.py        
2015-08-14 12:22:33.000000000 +0200
@@ -91,7 +91,29 @@
 
 
 def syslog2node(s):
-    '''Get the node from a syslog line.'''
+    '''
+    Get the node from a syslog line.
+
+    old format:
+    Aug 14 11:07:04 <node> ...
+    new format:
+    Aug 14 11:07:04 [<PID>] <node> ...
+    RFC5424:
+    <TS> <node> ...
+    RFC5424 (2):
+    <TS> [<PID>] <node> ...
+    '''
+
+    fmt1 = re.compile(r'\w+ \d+ \d+:\d+:\d+ (?:\[\d+\])? (\w+)')
+    m = fmt1.search(s)
+    if m:
+        return m.group(1)
+
+    fmt2 = re.compile(r'\w+ (?:\[\d+\])? (\w+)')
+    m = fmt2.search(s)
+    if m:
+        return m.group(1)
+
     try:
         # strptime defaults year to 1900 (sigh)
         time.strptime(' '.join(s.split()[0:3]),
@@ -220,7 +242,9 @@
     files list.
     '''
     node_l = [log2node(x) for x in log_l if x]
-    return [x for x in sl if is_our_log(x, node_l)]
+    ret = [x for x in sl if is_our_log(x, node_l)]
+    common_debug("filter_log: %s in, %s out" % (len(sl), len(ret)))
+    return ret
 
 
 def first_log_lines(log_l):
@@ -489,8 +513,8 @@
     2: full path of pe file
     3: pe file number
     """
-    m1 = "crmd.* do_te_invoke: Processing graph ([0-9]+) .*derived from 
(.*/pe-[^-]+-(%s)[.]bz2)" % (number_re)
-    m2 = "pengine.* process_pe_message: .*Transition ([0-9]+): .*([^ 
]*/pe-[^-]+-(%s)[.]bz2)" % (number_re)
+    m1 = "crmd.*do_te_invoke:.*Processing graph ([0-9]+).*derived from 
(.*/pe-[^-]+-(%s)[.]bz2)" % (number_re)
+    m2 = "pengine.*process_pe_message:.*Transition ([0-9]+):.*([^ 
]*/pe-[^-]+-(%s)[.]bz2)" % (number_re)
     try:
         return re.compile("(?:%s)|(?:%s)" % (m1, m2))
     except re.error, e:
@@ -504,7 +528,7 @@
     See transition_start_re for more details.
     """
     try:
-        return re.compile("crmd.* run_graph: .*Transition 
([0-9]+).*Source=(.*/pe-[^-]+-(%s)[.]bz2).: (Stopped|Complete|Terminated)" % 
(number_re))
+        return re.compile("crmd.*run_graph:.*Transition 
([0-9]+).*Source=(.*/pe-[^-]+-(%s)[.]bz2).:.*(Stopped|Complete|Terminated)" % 
(number_re))
     except re.error, e:
         common_debug("RE compilation failed: %s" % (e))
         raise ValueError("Error in search expression")
@@ -805,7 +829,7 @@
 
     def find_node_log(self, node):
         p = os.path.join(self.loc, node)
-        for lf in ("ha-log.txt", "messages", "journal.log"):
+        for lf in ("ha-log.txt", "messages", "journal.log", "pacemaker.log"):
             if is_log(os.path.join(p, lf)):
                 return os.path.join(p, lf)
         return None


Reply via email to