Hello community,

here is the log from the commit of package crmsh for openSUSE:Factory checked 
in at 2014-07-29 16:48:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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      2014-07-11 
20:06:08.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2014-07-29 
16:49:14.000000000 +0200
@@ -1,0 +2,16 @@
+Tue Jul 29 09:51:32 UTC 2014 - kgronl...@suse.com
+
+- high: report: Preserve path when checking timestamp of tarball (bnc#889328)
+- upstream: 2.1.0-20-g9de903ff5cd8 
+
+-------------------------------------------------------------------
+Tue Jul 22 07:42:50 UTC 2014 - kgronl...@suse.com
+
+- medium: config: Respect EDITOR and PAGER environment variables
+- medium: parse: pacemaker allows order without score or kind
+- medium: hb_report: add -Q option for quick runs
+- low: history: use -Q with hb_report to reduce waiting time
+- low: hb_report: add timestamp when debugging
+- upstream: 2.1.0-18-gb5962a2bb1d9 
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ crmsh.spec ++++++
--- /var/tmp/diff_new_pack.K65hMZ/_old  2014-07-29 16:49:15.000000000 +0200
+++ /var/tmp/diff_new_pack.K65hMZ/_new  2014-07-29 16:49:15.000000000 +0200
@@ -41,7 +41,7 @@
 Summary:        High Availability cluster command-line interface
 License:        GPL-2.0+
 Group:          %{pkg_group}
-Version:        2.1+git6
+Version:        2.1+git20
 Release:        %{?crmsh_release}%{?dist}
 Url:            http://crmsh.github.io
 Source0:        crmsh.tar.bz2

++++++ crmsh.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/doc/crm.8.txt new/crmsh/doc/crm.8.txt
--- old/crmsh/doc/crm.8.txt     2014-07-02 12:51:37.000000000 +0200
+++ new/crmsh/doc/crm.8.txt     2014-07-29 11:38:00.000000000 +0200
@@ -728,7 +728,7 @@
 
 ............
 primitive dummy-1 params $dummy-state-on:state=1
-primitive dummy-2 params @state
+primitive dummy-2 params @dummy-state-on
 ............
 
 There is also the possibility that two resources both use the same
@@ -2682,9 +2682,9 @@
 
 Usage:
 ...............
-order <id> {kind|<score>}: first then [symmetrical=<bool>]
+order <id> [{kind|<score>}:] first then [symmetrical=<bool>]
 
-order <id> {kind|<score>}: resource_sets [symmetrical=<bool>]
+order <id> [{kind|<score>}:] resource_sets [symmetrical=<bool>]
 
 kind :: Mandatory | Optional | Serialize
 
@@ -2702,9 +2702,10 @@
 ...............
 Example:
 ...............
-order c_apache_1 Mandatory: apache:start ip_1
-order o1 Serialize: A ( B C )
-order order_2 Mandatory: [ A B ] C
+order o-1 Mandatory: apache:start ip_1
+order o-2 Serialize: A ( B C )
+order o-3 inf: [ A B ] C
+order o-4 first-resource then-resource
 ...............
 
 [[cmdhelp_configure_rsc_ticket,resources ticket dependency]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/doc/crmsh_hb_report.8.txt 
new/crmsh/doc/crmsh_hb_report.8.txt
--- old/crmsh/doc/crmsh_hb_report.8.txt 2014-07-02 12:51:37.000000000 +0200
+++ new/crmsh/doc/crmsh_hb_report.8.txt 2014-07-29 11:38:00.000000000 +0200
@@ -13,7 +13,8 @@
 SYNOPSIS
 --------
 *crm 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
@@ -74,6 +75,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. `crm 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/crmsh/doc/website-v1/start-guide.txt 
new/crmsh/doc/website-v1/start-guide.txt
--- old/crmsh/doc/website-v1/start-guide.txt    2014-07-02 12:51:37.000000000 
+0200
+++ new/crmsh/doc/website-v1/start-guide.txt    2014-07-29 11:38:00.000000000 
+0200
@@ -94,25 +94,110 @@
 other nodes map to the IP addresses of those nodes. For example in a
 cluster consisting of `alice` and `bob`, executing `ping bob` when
 logged in as root on `alice` should successfully locate `bob` on the
-network. If the IP address of `bob` is `10.0.0.3`, this means the
-following line should be entered into `/etc/hosts` on `alice`:
+network. Given the IP addresses of `alice` and `bob` above, the
+following should be entered into `/etc/hosts` on both nodes:
 
 ........
+10.0.0.2      alice
 10.0.0.3      bob
 ........
 
-Once this is done, `crmsh` can handle the rest.
+Once this is done, SSH keys need to be installed for password-less
+access between the nodes. This is something that will hopefully be
+automated in the future, but is unfortunately a manual step at this
+point in time.
+
+The following commands should be executed as `root` on one of the
+nodes (in this example, `alice`):
+
+...............
+# ensure that the ssh server is started
+sudo systemctl start sshd
+# create the shared key
+mkdir -m 700 -p /root/.ssh
+ssh-keygen -q -f /root/.ssh/id_rsa -C "Cluster Internal" -N ''
+cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
+...............
+
+On the other nodes in the cluster (in this example, `bob`), execute
+the following as `root`:
+
+...............
+mkdir -m 700 -p /root/.ssh
+scp -oStrictHostKeyChecking=no \
+    root@alice:'/root/.ssh/id_rsa*' /root/.ssh
+cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
+...............
+
+This enables SSH to connect without prompting for a password between
+the nodes. Make sure this works before continuing with this guide.
 
 == Install and configure
 
-To create the necessary SSH keys, install the basic packages and
-configure `systemd` to manage Corosync and Pacemaker, the following
-command is provided by `crmsh`:
+To install the basic packages and configure `systemd` to manage
+Corosync and Pacemaker, the following command is provided by `crmsh`:
 
 ........
 crm cluster init nodes=alice,bob
 ........
 
+== Firewall
+
+If your cluster nodes have a firewall configured, you will need to
+open the following ports:
+
+* TCP: 5560
+* UDP: 5404, 5405
+* TCP: 21064 (if using DLM)
+* TCP: 30865 (if using csync2)
+* TCP: 7630 (if using the hawk web UI)
+
+TIP: Issues with the firewall may manifest itself by cluster nodes
+     being shown as `UNCLEAN` in the `crm status` output. If you see
+     this, it is likely that a firewall rule is blocking cluster
+     communications, or there may be some other problem with the
+     network connection between the nodes.
+
+== Quorum
+
+At this point, corosync needs to be configured for the particular
+cluster being created. First of all, `quorum` needs to taken into
+consideration. To make things as easy as possible, it is advisable to
+have a total number of nodes in the cluster that is not divisible by
+two. In other words, the number of nodes in the cluster should usually
+be either 3 or 5. This is to ensure __quorum__, that is, in the case
+of a loss of network connectivity between some subsets of nodes, one
+of the network partitions will either have more members than the
+others, or every node in the cluster will be isolated.
+
+To configure corosync to manage quorum for you, you need to enable
+`votequorum` in the corosync configuration. To do this, the following
+command can be used:
+
+........
+crm corosync set quorum.provider corosync_votequorum
+........
+
+Corosync also needs to know the number of nodes required to be
+considered a majority vote. Usually, this should be set to 2:
+
+........
+crm corosync set quorum.expected_votes 2
+........
+
+After changing the quorum settings, the changes need to be propagated
+across the cluster and corosync needs to be restarted. To do this, the
+following sequence of commands can be used:
+
+........
+crm corosync push
+crm cluster stop
+crm cluster start
+........
+
+NOTE: Restarting the cluster is only necessary if the cluster has
+      already been started.
+
 == Start Pacemaker
 
 To start Corosync and Pacemaker, the following command can be used:
@@ -178,7 +263,23 @@
 agent for the resource to be the `Dummy` agent.
 
 `crm status` should now show the `p0` resource as started on one
-of the cluster nodes.
+of the cluster nodes:
+
+........
+# crm status
+Last updated: Wed Jul  2 21:49:26 2014
+Last change: Wed Jul  2 21:49:19 2014
+Stack: corosync
+Current DC: alice (2) - partition with quorum
+Version: 1.1.11-c3f1a7f
+2 Nodes configured
+1 Resources configured
+
+
+Online: [ alice bob ]
+
+ p0    (ocf::heartbeat:Dummy): Started alice
+........
 
 The resource can be stopped or started using the `resource start` and
 `resource stop` commands:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/hb_report/hb_report.in 
new/crmsh/hb_report/hb_report.in
--- old/crmsh/hb_report/hb_report.in    2014-07-02 12:51:37.000000000 +0200
+++ new/crmsh/hb_report/hb_report.in    2014-07-29 11:38:00.000000000 +0200
@@ -168,8 +168,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@_+=:.-]' &&
@@ -527,6 +535,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"
@@ -672,7 +681,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"
@@ -732,7 +741,8 @@
        @datadir@/@PACKAGE_NAME@/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`"
@@ -1094,7 +1104,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
@@ -1103,7 +1113,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 +1173,7 @@
        userargs="$@"
        DESTDIR=.
        DEST="hb_report-"`date +"%a-%d-%b-%Y"`
-       while getopts f:t:l:u:p:L:e:E:n:MSDCZAVsvhd o; do
+       while getopts f:t:l:u:p:L:e:E:n:MSDCZAVsvhdQ o; do
                case "$o" in
                        h) usage;;
                        V) version;;
@@ -1188,6 +1198,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;;
@@ -1222,7 +1233,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/crmsh/hb_report/utillib.sh 
new/crmsh/hb_report/utillib.sh
--- old/crmsh/hb_report/utillib.sh      2014-07-02 12:51:37.000000000 +0200
+++ new/crmsh/hb_report/utillib.sh      2014-07-29 11:38:00.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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/cibconfig.py 
new/crmsh/modules/cibconfig.py
--- old/crmsh/modules/cibconfig.py      2014-07-02 12:51:37.000000000 +0200
+++ new/crmsh/modules/cibconfig.py      2014-07-29 11:38:00.000000000 +0200
@@ -1793,7 +1793,7 @@
     def _repr_cli_head(self, format):
         s = clidisplay.keyword(self.obj_type)
         id = clidisplay.id(self.obj_id)
-        score = clidisplay.score(get_score(self.node) or get_kind(self.node))
+        score = get_score(self.node) or get_kind(self.node)
         if self.node.find("resource_set") is not None:
             col = rsc_set_constraint(self.node, self.obj_type)
         else:
@@ -1808,7 +1808,10 @@
             node_attr = self.node.get("node-attribute")
             if node_attr:
                 col.append("node-attribute=%s" % node_attr)
-        return "%s %s %s: %s" % (s, id, score, ' '.join(col))
+        s = "%s %s " % (s, id)
+        if score != '':
+            s += "%s: " % (clidisplay.score(score))
+        return s + ' '.join(col)
 
     def _mk_optional_set(self, gv_obj, n):
         '''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/config.py new/crmsh/modules/config.py
--- old/crmsh/modules/config.py 2014-07-02 12:51:37.000000000 +0200
+++ new/crmsh/modules/config.py 2014-07-29 11:38:00.000000000 +0200
@@ -166,8 +166,8 @@
 
 DEFAULTS = {
     'core': {
-        'editor': opt_program('$EDITOR', ('vim', 'vi', 'emacs', 'nano')),
-        'pager': opt_program('$PAGER', ('less', 'more', 'pg')),
+        'editor': opt_program('EDITOR', ('vim', 'vi', 'emacs', 'nano')),
+        'pager': opt_program('PAGER', ('less', 'more', 'pg')),
         'user': opt_string(''),
         'skill_level': opt_choice('expert', ('operator', 'administrator', 
'expert')),
         'sort_elements': opt_boolean('yes'),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/parse.py new/crmsh/modules/parse.py
--- old/crmsh/modules/parse.py  2014-07-02 12:51:37.000000000 +0200
+++ new/crmsh/modules/parse.py  2014-07-29 11:38:00.000000000 +0200
@@ -762,7 +762,7 @@
 
     def parse_order(self):
         '''
-        order <id> {kind|<score>}: <rsc>[:<action>] <rsc>[:<action>] ...
+        order <id> [{kind|<score>}:] <rsc>[:<action>] <rsc>[:<action>] ...
           [symmetrical=<bool>]
 
         kind :: Mandatory | Optional | Serialize
@@ -771,8 +771,7 @@
         if self.try_match('(%s):$' % 
('|'.join(self.validation.rsc_order_kinds()))):
             out.set('kind', self.validation.canonize(
                 self.matched(1), self.validation.rsc_order_kinds()))
-        else:
-            self.match(self._SCORE_RE, errmsg="Expected kind|<score>:")
+        elif self.try_match(self._SCORE_RE):
             out.set(*self.validate_score(self.matched(1), noattr=True))
         if self.try_match_tail('symmetrical=(true|false|yes|no|on|off)$'):
             out.set('symmetrical', canonical_boolean(self.matched(1)))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/modules/report.py new/crmsh/modules/report.py
--- old/crmsh/modules/report.py 2014-07-02 12:51:37.000000000 +0200
+++ new/crmsh/modules/report.py 2014-07-29 11:38:00.000000000 +0200
@@ -687,7 +687,7 @@
             return None
         self.set_change_origin(CH_SRC)
         if os.path.isdir(loc):
-            if (os.stat(bfname).st_mtime - os.stat(loc).st_mtime) < 60:
+            if (os.stat(tarball).st_mtime - os.stat(loc).st_mtime) < 60:
                 return loc
             rmdir_r(loc)
         cwd = os.getcwd()
@@ -954,7 +954,7 @@
         if pipe_cmd_nosudo("mkdir -p %s" % os.path.dirname(d)) != 0:
             return None
         common_info("retrieving information from cluster nodes, please wait 
...")
-        rc = pipe_cmd_nosudo("%s/hb_report -Z -f '%s' %s %s %s" %
+        rc = pipe_cmd_nosudo("%s/hb_report -Z -Q -f '%s' %s %s %s" %
                              (config.path.sharedir,
                               self.from_dt.ctime(),
                               to_option,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh/test/unittests/test_bugs.py 
new/crmsh/test/unittests/test_bugs.py
--- old/crmsh/test/unittests/test_bugs.py       2014-07-02 12:51:37.000000000 
+0200
+++ new/crmsh/test/unittests/test_bugs.py       2014-07-29 11:38:00.000000000 
+0200
@@ -259,6 +259,22 @@
     assert obj.cli_use_validate()
 
 
+def test_order_without_score_kind():
+    """
+    Spec says order doesn't require score or kind to be set
+    """
+    xml = '<rsc_order first="a" first-action="promote" id="order-a-b" then="b" 
then-action="start"/>'
+    data = etree.fromstring(xml)
+    obj = factory.create_from_node(data)
+    assert obj is not None
+    data = obj.repr_cli(format=-1)
+    print "OUTPUT:", data
+    exp = 'order order-a-b a:promote b:start'
+    assert data == exp
+    assert obj.cli_use_validate()
+
+
+
 def test_bnc878112():
     """
     crm configure group can hijack a cloned primitive (and then crash)

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to