Hello community, here is the log from the commit of package cluster-glue for openSUSE:Factory checked in at 2014-07-27 08:25:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2014-07-10 08:16:49.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.cluster-glue.new/cluster-glue.changes 2014-07-27 08:25:37.000000000 +0200 @@ -1,0 +2,12 @@ +Thu Jul 17 14:53:25 UTC 2014 - [email protected] + +- hb_report: add -Q to usage +- upstream cs: ec7802482c73 + +------------------------------------------------------------------- +Wed Jul 9 15:02:38 UTC 2014 - [email protected] + +- hb_report: add -Q option for quick runs +- upstream cs: 51d0ebbb2868 + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cluster-glue.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/.hg_archival.txt new/cluster-glue/.hg_archival.txt --- old/cluster-glue/.hg_archival.txt 2014-07-02 11:10:32.000000000 +0200 +++ new/cluster-glue/.hg_archival.txt 2014-07-14 17:49:05.000000000 +0200 @@ -1,5 +1,5 @@ repo: e3ffdd7ae81c596b2be7e1e110d2c1255161340e -node: 0abe35bebf5fd26c1efcd2bb8f796e697c8492fd +node: ec7802482c733072db57b46d4304f27040f81bcd branch: default latesttag: glue-1.0.12-rc1 -latesttagdistance: 23 +latesttagdistance: 27 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/doc/hb_report.8.txt new/cluster-glue/doc/hb_report.8.txt --- old/cluster-glue/doc/hb_report.8.txt 2014-07-02 11:10:32.000000000 +0200 +++ new/cluster-glue/doc/hb_report.8.txt 2014-07-14 17:49:05.000000000 +0200 @@ -14,7 +14,8 @@ SYNOPSIS -------- *hb_report* -f {time|"cts:"testnum} [-t time] [-u user] [-l file] - [-n nodes] [-E files] [-p patt] [-L patt] [-e prog] [-MSDCZAVsvhd] [dest] + [-n nodes] [-E files] [-p patt] [-L patt] [-e prog] + [-MSDCZAQVsvhd] [dest] DESCRIPTION @@ -75,6 +76,14 @@ Additional patterns to match parameter name which contain sensitive information. This option is additive (default: "passw.*"). +*-Q*:: + Quick run. Gathering some system information can be expensive. + With this option, such operations are skipped and thus + information collecting sped up. The operations considered + I/O or CPU intensive: verifying installed packages content, + sanitizing files for sensitive information, and producing dot + files from PE inputs. + *-A*:: This is an OpenAIS cluster. hb_report has some heuristics to find the cluster stack, but that is not always reliable. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/hb_report/hb_report.in new/cluster-glue/hb_report/hb_report.in --- old/cluster-glue/hb_report/hb_report.in 2014-07-02 11:10:32.000000000 +0200 +++ new/cluster-glue/hb_report/hb_report.in 2014-07-14 17:49:05.000000000 +0200 @@ -69,7 +69,7 @@ cat<<EOF usage: hb_report -f {time|"cts:"testnum} [-t time] [-u user] [-X ssh-options] [-l file] [-n nodes] [-E files] - [-p patt] [-L patt] [-e prog] [-MSDZAVsvhd] [dest] + [-p patt] [-L patt] [-e prog] [-MSDZAQVsvhd] [dest] -f time: time to start from or a CTS test number -t time: time to finish at (dflt: now) @@ -89,6 +89,7 @@ -L patt: regular expression to match in log files for analysis; this option is additive (dflt: $LOG_PATTERNS) -e prog: your favourite editor + -Q : don't run resource intensive operations (speed up) -M : don't collect extra logs (/var/log/messages) -D : don't invoke editor to write description -Z : if destination directories exist, remove them instead of exiting @@ -170,8 +171,16 @@ TRY_SSH="root hacluster" SLAVEPIDS="" NO_DESCRIPTION="1" + SKIP_LVL=0 VERBOSITY=0 } +# +# caller may skip collecting information if the skip level +# exceeds the given value +# +skip_lvl() { + [ $SKIP_LVL -ge $1 ] +} chkname() { [ "$1" ] || usage short echo $1 | grep -qs '[^a-zA-Z0-9@_+=:.-]' && @@ -529,6 +538,7 @@ UNIQUE_MSG=$UNIQUE_MSG SANITIZE="$SANITIZE" DO_SANITIZE="$DO_SANITIZE" +SKIP_LVL="$SKIP_LVL" EXTRA_LOGS="$EXTRA_LOGS" USER_CLUSTER_TYPE="$USER_CLUSTER_TYPE" CONF="$CONF" @@ -674,7 +684,7 @@ } if [ `echo $flist | wc -w` -le 20 ]; then for f in $flist; do - pe2dot $3/`basename $pe_dir`/`basename $f` + skip_lvl 1 || pe2dot $3/`basename $pe_dir`/`basename $f` done else debug "too many PE inputs to create dot files" @@ -734,7 +744,8 @@ hb_report -V # our info echo "resource-agents: `grep 'Build version:' @OCF_ROOT_DIR@/lib/heartbeat/ocf-shellfuncs`" crm_info - pkg_ver $PACKAGES + pkg_versions $PACKAGES + skip_lvl 1 || verify_packages $PACKAGES echo "Platform: `uname`" echo "Kernel release: `uname -r`" echo "Architecture: `uname -m`" @@ -1097,7 +1108,7 @@ getconfig $WORKDIR getpeinputs $FROM_TIME $TO_TIME $WORKDIR & crmconfig $WORKDIR & - touch_DC_if_dc $WORKDIR & + skip_lvl 1 || touch_DC_if_dc $WORKDIR & getbacktraces $FROM_TIME $TO_TIME $WORKDIR/$BT_F getconfigurations $WORKDIR check_perms > $WORKDIR/$PERMISSIONS_F 2>&1 @@ -1106,7 +1117,7 @@ corosync_blackbox $FROM_TIME $TO_TIME $WORKDIR/$COROSYNC_RECORDER_F getratraces $FROM_TIME $TO_TIME $WORKDIR wait - sanitize $WORKDIR + skip_lvl 1 || sanitize $WORKDIR for l in $EXTRA_LOGS; do [ "$NO_str2time" ] && break @@ -1163,7 +1174,7 @@ userargs="$@" DESTDIR=. DEST="hb_report-"`date +"%a-%d-%b-%Y"` - while getopts f:t:l:u:X:p:L:e:E:n:MSDCZAVsvhd o; do + while getopts f:t:l:u:X:p:L:e:E:n:MSDCZAVsvhdQ o; do case "$o" in h) usage;; V) version;; @@ -1189,6 +1200,7 @@ e) EDITOR="$OPTARG";; p) SANITIZE="$SANITIZE $OPTARG";; s) DO_SANITIZE="1";; + Q) SKIP_LVL=$((SKIP_LVL + 1));; L) LOG_PATTERNS="$LOG_PATTERNS $OPTARG";; S) NO_SSH=1;; D) NO_DESCRIPTION=1;; @@ -1223,7 +1235,7 @@ is_collector || { info "high debug level, please read debug.out" } - PS4='+ ${FUNCNAME[0]:+${FUNCNAME[0]}:}${LINENO}: ' + PS4='+ `date +"%T"`: ${FUNCNAME[0]:+${FUNCNAME[0]}:}${LINENO}: ' if echo "$SHELL" | grep bash > /dev/null && [ ${BASH_VERSINFO[0]} = "4" ]; then exec 3>>$WORKDIR/debug.out diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cluster-glue/hb_report/utillib.sh new/cluster-glue/hb_report/utillib.sh --- old/cluster-glue/hb_report/utillib.sh 2014-07-02 11:10:32.000000000 +0200 +++ new/cluster-glue/hb_report/utillib.sh 2014-07-14 17:49:05.000000000 +0200 @@ -688,13 +688,10 @@ pkg_ver_deb() { dpkg-query -f '${Name} ${Version}' -W $* 2>/dev/null - debsums -s $* 2>/dev/null } pkg_ver_rpm() { - { - rpm -q --qf '%{name} %{version}-%{release} - %{distribution} %{arch}\n' $* - rpm --verify $* - } 2>&1 | grep -v 'not installed' + rpm -q --qf '%{name} %{version}-%{release} - %{distribution} %{arch}\n' $* 2>&1 | + grep -v 'not installed' } pkg_ver_pkg_info() { for pkg; do @@ -706,7 +703,20 @@ pkginfo $pkg | awk '{print $3}' # format? done } -pkg_ver() { +verify_deb() { + debsums -s $* 2>/dev/null +} +verify_rpm() { + rpm --verify $* 2>&1 | grep -v 'not installed' +} +verify_pkg_info() { + : +} +verify_pkginfo() { + : +} + +get_pkg_mgr() { local pkg_mgr if which dpkg >/dev/null 2>&1 ; then pkg_mgr="deb" @@ -717,12 +727,25 @@ elif which pkginfo >/dev/null 2>&1 ; then pkg_mgr="pkginfo" else - echo "Unknown package manager!" + warning "Unknown package manager!" return fi + echo $pkg_mgr +} + +pkg_versions() { + local pkg_mgr=`get_pkg_mgr` + [ -z "$pkg_mgr" ] && + return debug "the package manager is $pkg_mgr" pkg_ver_$pkg_mgr $* } +verify_packages() { + local pkg_mgr=`get_pkg_mgr` + [ -z "$pkg_mgr" ] && + return + verify_$pkg_mgr $* +} crm_info() { $CRM_DAEMON_DIR/crmd version 2>&1 -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
