Hello community,

here is the log from the commit of package crmsh for openSUSE:Factory checked 
in at 2018-02-07 18:42:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crmsh (Old)
 and      /work/SRC/openSUSE:Factory/.crmsh.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "crmsh"

Wed Feb  7 18:42:49 2018 rev:139 rq:573719 version:4.0.0+git.1518010150.a58fa637

Changes:
--------
--- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes      2018-01-17 
21:59:32.643746783 +0100
+++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2018-02-07 
18:42:51.896104819 +0100
@@ -1,0 +2,9 @@
+Wed Feb 07 13:50:36 UTC 2018 - kgronl...@suse.com
+
+- Update to version 4.0.0+git.1518010150.a58fa637:
+  * high: bootstrap: Add QDevice/QNetd support (bsc#1070961)
+  * medium: hb_report: implement dlm_dump info (bsc#1078710)
+  * fix: hb_report: collect sbd info (bsc#1076389)
+  * fix: hb_report: Collect irregular log file (bsc#1067438)
+
+-------------------------------------------------------------------

Old:
----
  crmsh-4.0.0+git.1516124911.d66d9d1f.tar.bz2

New:
----
  crmsh-4.0.0+git.1518010150.a58fa637.tar.bz2

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

Other differences:
------------------
++++++ crmsh.spec ++++++
--- /var/tmp/diff_new_pack.RsVGT5/_old  2018-02-07 18:42:52.700067176 +0100
+++ /var/tmp/diff_new_pack.RsVGT5/_new  2018-02-07 18:42:52.700067176 +0100
@@ -36,7 +36,7 @@
 Summary:        High Availability cluster command-line interface
 License:        GPL-2.0+
 Group:          %{pkg_group}
-Version:        4.0.0+git.1516124911.d66d9d1f
+Version:        4.0.0+git.1518010150.a58fa637
 Release:        0
 Url:            http://crmsh.github.io
 Source0:        %{name}-%{version}.tar.bz2

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.RsVGT5/_old  2018-02-07 18:42:52.748064928 +0100
+++ /var/tmp/diff_new_pack.RsVGT5/_new  2018-02-07 18:42:52.748064928 +0100
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
             <param name="url">git://github.com/ClusterLabs/crmsh.git</param>
-          <param 
name="changesrevision">d66d9d1fcee2cb4f0f4b06beaa4f5140caeb67e3</param></service></servicedata>
\ No newline at end of file
+          <param 
name="changesrevision">a58fa637efb583995c31c62d3fa3894b875e2f3a</param></service></servicedata>
\ No newline at end of file

++++++ crmsh-4.0.0+git.1516124911.d66d9d1f.tar.bz2 -> 
crmsh-4.0.0+git.1518010150.a58fa637.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh-4.0.0+git.1516124911.d66d9d1f/.travis.yml 
new/crmsh-4.0.0+git.1518010150.a58fa637/.travis.yml
--- old/crmsh-4.0.0+git.1516124911.d66d9d1f/.travis.yml 2018-01-16 
18:48:31.000000000 +0100
+++ new/crmsh-4.0.0+git.1518010150.a58fa637/.travis.yml 2018-02-07 
14:29:10.000000000 +0100
@@ -8,7 +8,7 @@
   - docker pull krig/crmsh:latest
 
 script:
-  - docker run -t -v "$(pwd):/app" krig/crmsh /bin/sh -c "systemctl start 
dbus; cd /app; ./test/run-in-container.sh"
+  - docker run -t -v "$(pwd):/app" krig/crmsh /bin/sh -c "systemctl start 
dbus; cd /app; ./test/run-in-travis.sh"
 
 after_failure:
   - sudo cat $TRAVIS_BUILD_DIR/crmtestout/regression.out 
$TRAVIS_BUILD_DIR/crmtestout/crm.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.0.0+git.1516124911.d66d9d1f/crmsh/bootstrap.py 
new/crmsh-4.0.0+git.1518010150.a58fa637/crmsh/bootstrap.py
--- old/crmsh-4.0.0+git.1516124911.d66d9d1f/crmsh/bootstrap.py  2018-01-16 
18:48:31.000000000 +0100
+++ new/crmsh-4.0.0+git.1518010150.a58fa637/crmsh/bootstrap.py  2018-02-07 
14:29:10.000000000 +0100
@@ -66,6 +66,7 @@
         self.connect_name = None
         self.second_hb = None
         self.ui_context = None
+        self.qdevice = None
 
 
 _context = None
@@ -549,12 +550,16 @@
 
     Please note corosync uses two UDP ports mcastport (for mcast
     receives) and mcastport - 1 (for mcast sends).
+
+    Also open QNetd/QDevice port if configured.
     """
     # all mcastports defined in corosync config
     udp = corosync.get_values("totem.interface.mcastport")
     udp.extend([str(int(p) - 1) for p in udp])
 
-    configure_firewall(udp=udp)
+    tcp = corosync.get_values("totem.quorum.device.net.port")
+
+    configure_firewall(tcp=tcp, udp=udp)
 
 
 def init_cluster_local():
@@ -912,7 +917,8 @@
         mcastport=mcastport_res,
         transport="udpu",
         ipv6=_context.ipv6,
-        two_rings=two_rings)
+        two_rings=two_rings,
+        qdevice=_context.qdevice)
     csync2_update(corosync.conf())
 
 
@@ -1032,7 +1038,8 @@
         mcastport=mcastport_res,
         ipv6=_context.ipv6,
         nodeid=nodeid,
-        two_rings=two_rings)
+        two_rings=two_rings,
+        qdevice=_context.qdevice)
     csync2_update(corosync.conf())
 
 
@@ -1723,6 +1730,9 @@
         # get a list of nodes, excluding remote nodes
         nodelist = None
         loop_count = 0
+        device_votes = 0
+        nodecount = 0
+        expected_votes = 0
         while True:
             rc, nodelist_text = utils.get_stdout("cibadmin -Ql --xpath 
'/cib/status/node_state'")
             if rc == 0:
@@ -1742,16 +1752,55 @@
         # Increase expected_votes
         # TODO: wait to adjust expected_votes until after cluster join,
         # so that we can ask the cluster for the current membership list
+        # Have to check if a qnetd device is configured and increase
+        # expected_votes in that case
+        use_qdevice = 1 if corosync.get_value("quorum.device.model") == "net" 
else 0
         if nodelist is None:
-            nodecount = 0
             for v in corosync.get_values("quorum.expected_votes"):
-                nodecount = int(v) + 1
-                corosync.set_value("quorum.expected_votes", str(nodecount))
-                corosync.set_value("quorum.two_node", 1 if nodecount == 2 else 
0)
+                expected_votes = v
+                #for node >= 2, expected_votes = nodecount + device_votes
+                #asume nodecount is N, for ffsplit, qdevice only has one vote
+                #which means that device_votes is 1, ie:expected_votes = N + 1;
+                #while for lms, qdevice has N - 1 votes, ie: expected_votes = 
N + (N - 1)
+                #and update quorum.device.net.algorithm based on device_votes
+
+                if corosync.get_value("quorum.device.net.algorithm") == "lms":
+                    device_votes = int((expected_votes - 1) / 2)
+                    nodecount = expected_votes - device_votes
+                    #as nodecount will increase 1, and device_votes is 
nodecount - 1
+                    #device_votes also increase 1
+                    device_votes += 1
+                elif corosync.get_value("quorum.device.net.algorithm") == 
"ffsplit":
+                    device_votes = 1
+                    nodecount = expected_votes - device_votes
+                elif use_qdevice == 0:
+                    device_votes = 0
+                    nodecount = v
+
+                nodecount += 1
+                expected_votes = nodecount + device_votes
+                corosync.set_value("quorum.expected_votes", 
str(expected_votes))
         else:
             nodecount = len(nodelist)
-            corosync.set_value("quorum.expected_votes", str(nodecount))
-            corosync.set_value("quorum.two_node", 1 if nodecount == 2 else 0)
+            expected_votes = 0
+            #for node >= 2, expected_votes = nodecount + device_votes
+            #asume nodecount is N, for ffsplit, qdevice only has one vote
+            #which means that device_votes is 1, ie:expected_votes = N + 1;
+            #while for lms, qdevice has N - 1 votes, ie: expected_votes = N + 
(N - 1)
+            if corosync.get_value("quorum.device.net.algorithm") == "ffsplit":
+                device_votes = 1
+            if corosync.get_value("quorum.device.net.algorithm") == "lms":
+                device_votes = nodecount - 1
+
+            expected_votes = nodecount + device_votes
+
+            if corosync.get_value("quorum.expected_votes"):
+                corosync.set_value("quorum.expected_votes", 
str(expected_votes))
+        if use_qdevice == 0:
+            corosync.set_value("quorum.two_node", 1 if expected_votes == 2 
else 0)
+        if use_qdevice:
+            corosync.set_value("quorum.device.votes", device_votes)
+
         csync2_update(corosync.conf())
     update_expected_votes()
 
@@ -1894,11 +1943,34 @@
         corosync.del_node(node)
 
     # Decrement expected_votes in corosync.conf
-    votes = corosync.get_values("quorum.expected_votes")
-    for vote in votes:
-        new_quorum = int(vote) - 1
+    use_qdevice = 1 if "net" in corosync.get_values("quorum.device.model") 
else 0
+    for vote in corosync.get_values("quorum.expected_votes"):
+        quorum = int(vote)
+        new_quorum = quorum - 1
+        if use_qdevice > 0:
+            new_nodecount = 0
+            device_votes = 0
+            nodecount = 0
+
+            if corosync.get_value("quorum.device.net.algorithm") == "lms":
+                nodecount = int((quorum + 1)/2)
+                new_nodecount = nodecount - 1
+                device_votes = new_nodecount - 1
+
+            elif corosync.get_value("quorum.device.net.algorithm") == 
"ffsplit":
+                device_votes = 1
+                nodecount = quorum - device_votes
+                new_nodecount = nodecount - 1
+
+            if new_nodecount == 1:
+                device_votes = 0
+
+            corosync.set_value("quorum.device.votes", device_votes)
+            new_quorum = new_nodecount + device_votes
+
+        if use_qdevice == 0:
+            corosync.set_value("quorum.two_node", 1 if new_quorum == 2 else 0)
         corosync.set_value("quorum.expected_votes", str(new_quorum))
-        corosync.set_value("quorum.two_node", 1 if new_quorum == 2 else 0)
 
     status("Propagating configuration changes across the remaining nodes")
     csync2_update(CSYNC2_CFG)
@@ -1923,7 +1995,7 @@
 def bootstrap_init(cluster_name="hacluster", ui_context=None, nic=None, 
ocfs2_device=None,
                    shared_device=None, sbd_device=None, diskless_sbd=False, 
quiet=False,
                    template=None, admin_ip=None, yes_to_all=False,
-                   unicast=False, second_hb=False, ipv6=False, watchdog=None, 
stage=None, args=None):
+                   unicast=False, second_hb=False, ipv6=False, watchdog=None, 
qdevice=None, stage=None, args=None):
     """
     -i <nic>
     -o <ocfs2-device>
@@ -1962,6 +2034,7 @@
     _context.admin_ip = admin_ip
     _context.watchdog = watchdog
     _context.ui_context = ui_context
+    _context.qdevice = qdevice
 
     def check_option():
         if _context.admin_ip and not valid_adminIP(_context.admin_ip):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.0.0+git.1516124911.d66d9d1f/crmsh/constants.py 
new/crmsh-4.0.0+git.1518010150.a58fa637/crmsh/constants.py
--- old/crmsh-4.0.0+git.1516124911.d66d9d1f/crmsh/constants.py  2018-01-16 
18:48:31.000000000 +0100
+++ new/crmsh-4.0.0+git.1518010150.a58fa637/crmsh/constants.py  2018-02-07 
14:29:10.000000000 +0100
@@ -11,6 +11,7 @@
     "primitive": "element",
     "resource": "element",
     "group": "element",
+    "bundle": "element",
     "clone": "element",
     "ms": "element",
     "master": "element",
@@ -102,13 +103,13 @@
 }
 container_tags = ("group", "clone", "ms", "master", "bundle")
 clonems_tags = ("clone", "ms", "master")
-resource_tags = ("primitive", "group", "clone", "ms", "master", "template")
+resource_tags = ("primitive", "group", "clone", "ms", "master", "template", 
"bundle")
 constraint_tags = ("rsc_location", "rsc_colocation", "rsc_order", "rsc_ticket")
 constraint_rsc_refs = ("rsc", "with-rsc", "first", "then")
 children_tags = ("group", "primitive")
 nvpairs_tags = ("meta_attributes", "instance_attributes", "utilization")
 defaults_tags = ("rsc_defaults", "op_defaults")
-resource_cli_names = ("primitive", "group", "clone", "ms", "master", 
"rsc_template")
+resource_cli_names = ("primitive", "group", "clone", "ms", "master", 
"rsc_template", "bundle")
 constraint_cli_names = ("location", "colocation", "collocation", "order", 
"rsc_ticket")
 nvset_cli_names = ("property", "rsc_defaults", "op_defaults")
 op_cli_names = ("monitor",
@@ -299,6 +300,10 @@
     "ms": {
         "color": "#f8981d",
     },
+    "bundle": {
+        "color": "#00aeef",
+        "style": "rounded",
+    },
     "group": {
         "color": "#00aeef",
         "group": "#00aeef",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.0.0+git.1516124911.d66d9d1f/crmsh/corosync.py 
new/crmsh-4.0.0+git.1518010150.a58fa637/crmsh/corosync.py
--- old/crmsh-4.0.0+git.1516124911.d66d9d1f/crmsh/corosync.py   2018-01-16 
18:48:31.000000000 +0100
+++ new/crmsh-4.0.0+git.1518010150.a58fa637/crmsh/corosync.py   2018-02-07 
14:29:10.000000000 +0100
@@ -57,6 +57,14 @@
         return '%s: %s' % (self.key, self.value)
 
 
+class QDevice(object):
+    def __init__(self, ip, port=5403, algo="ffsplit", tie_breaker="lowest"):
+        self.ip = ip
+        self.port = port
+        self.algo = algo
+        self.tie_breaker = tie_breaker
+
+
 def corosync_tokenizer(stream):
     """Parses the corosync config file into a token stream"""
     section_re = re.compile(r'(\w+)\s*{')
@@ -388,6 +396,8 @@
 
     num_nodes = p.count('nodelist.node')
     p.set('quorum.two_node', '1' if num_nodes == 2 else '0')
+    if p.get("quorum.device.model") == "net":
+        p.set('quorum.two_node', '0')
 
     f = open(conf(), 'w')
     f.write(p.to_string())
@@ -436,6 +446,8 @@
 
     num_nodes = p.count('nodelist.node')
     p.set('quorum.two_node', '1' if num_nodes == 2 else '0')
+    if p.get("quorum.device.model") == "net":
+        p.set('quorum.two_node', '0')
 
     f = open(conf(), 'w')
     f.write(p.to_string())
@@ -467,6 +479,8 @@
 
     num_nodes = p.count('nodelist.node')
     p.set('quorum.two_node', '1' if num_nodes == 2 else '0')
+    if p.get("quorum.device.model") == "net":
+        p.set('quorum.two_node', '0')
 
     f = open(conf(), 'w')
     f.write(p.to_string())
@@ -524,13 +538,7 @@
 }
 
 %(nodelist)s
-quorum {
-    # Enable and configure quorum subsystem (default: off)
-    # see also corosync.conf.5 and votequorum.5
-    provider: corosync_votequorum
-    expected_votes: 1
-    two_node: 0
-}
+%(quorum)s
 """
 _COROSYNC_CONF_TEMPLATE_RING = """
     interface {
@@ -550,7 +558,8 @@
                          transport=None,
                          ipv6=False,
                          nodeid=None,
-                         two_rings=False):
+                         two_rings=False,
+                         qdevice=None):
 
     if transport == "udpu":
         ring_tmpl = ""
@@ -561,7 +570,7 @@
 
         nodelist_tmpl = """nodelist {
     node {
-%(ringaddr)s       
+%(ringaddr)s
         nodeid: 1
     }
 }
@@ -584,9 +593,39 @@
         if transport != "udpu":
             ipv6_nodeid = "nodeid:  %d" % nodeid
 
+    quorum_tmpl = """quorum {
+    # Enable and configure quorum subsystem (default: off)
+    # see also corosync.conf.5 and votequorum.5
+    provider: corosync_votequorum
+    expected_votes: 1
+    two_node: 0
+}
+"""
+    if qdevice is not None:
+        quorum_tmpl = """quorum {
+    # Enable and configure quorum subsystem (default: off)
+    # see also corosync.conf.5 and votequorum.5
+    provider: corosync_votequorum
+    expected_votes: 1
+    two_node: 0
+    device {
+      votes: 0
+      model: net
+      net {
+        tls: off
+        host: %(ip)s
+        port: %(port)s
+        algorithm: %(algo)s
+        tie_breaker: %(tie_breaker)s
+      }
+    }
+}
+""" % qdevice.__dict__
+
     config_common = {
         "clustername": clustername,
         "nodelist": nodelist_tmpl,
+        "quorum": quorum_tmpl,
         "ipv6": ipv6_tmpl,
         "ipv6_nodeid": ipv6_nodeid,
         "rrp_mode": rrp_mode_tmp,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.0.0+git.1516124911.d66d9d1f/crmsh/ui_cluster.py 
new/crmsh-4.0.0+git.1518010150.a58fa637/crmsh/ui_cluster.py
--- old/crmsh-4.0.0+git.1516124911.d66d9d1f/crmsh/ui_cluster.py 2018-01-16 
18:48:31.000000000 +0100
+++ new/crmsh-4.0.0+git.1518010150.a58fa637/crmsh/ui_cluster.py 2018-02-07 
14:29:10.000000000 +0100
@@ -205,6 +205,18 @@
                                  help="Configure corosync with second 
heartbeat line")
         network_group.add_option("-I", "--ipv6", action="store_true", 
dest="ipv6",
                                  help="Configure corosync use IPv6")
+        network_group.add_option("--qdevice",
+                                 dest="qdevice", metavar="QDEVICE",
+                                 help="QDevice IP")
+        network_group.add_option("--qdevice-port",
+                                 dest="qdevice_port", metavar="QDEVICE_PORT", 
type="int", default=5403,
+                                 help="QDevice port")
+        network_group.add_option("--qdevice-algo",
+                                 dest="qdevice_algo", metavar="QDEVICE_ALGO", 
default="ffsplit",
+                                 help="QDevice algorithm")
+        network_group.add_option("--qdevice-tie-breaker",
+                                 dest="qdevice_tie_breaker", 
metavar="QDEVICE_TIE_BREAKER", default="lowest",
+                                 help="QDevice algorithm")
         parser.add_option_group(network_group)
 
         storage_group = optparse.OptionGroup(parser, "Storage configuration", 
"Options for configuring shared storage.")
@@ -238,6 +250,14 @@
         #    parser.error("For a geo cluster, each cluster must have a unique 
name (use --name to set)")
         #    return False
 
+        qdevice = None
+        if options.qdevice:
+            qdevice = corosync.QDevice(
+                options.qdevice,
+                port=options.qdevice_port,
+                algo=options.qdevice_algo,
+                tie_breaker=options.qdevice_tie_breaker)
+
         bootstrap.bootstrap_init(
             cluster_name=options.name,
             ui_context=context,
@@ -254,6 +274,7 @@
             second_hb=options.second_hb,
             ipv6=options.ipv6,
             watchdog=options.watchdog,
+            qdevice=qdevice,
             stage=stage,
             args=args)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh-4.0.0+git.1516124911.d66d9d1f/data-manifest 
new/crmsh-4.0.0+git.1518010150.a58fa637/data-manifest
--- old/crmsh-4.0.0+git.1516124911.d66d9d1f/data-manifest       2018-01-16 
18:48:31.000000000 +0100
+++ new/crmsh-4.0.0+git.1518010150.a58fa637/data-manifest       2018-02-07 
14:29:10.000000000 +0100
@@ -71,6 +71,7 @@
 test/regression.sh
 test/run
 test/run-in-container.sh
+test/run-in-travis.sh
 test/testcases/acl
 test/testcases/acl.excl
 test/testcases/acl.exp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.0.0+git.1516124911.d66d9d1f/hb_report/constants.py 
new/crmsh-4.0.0+git.1518010150.a58fa637/hb_report/constants.py
--- old/crmsh-4.0.0+git.1516124911.d66d9d1f/hb_report/constants.py      
2018-01-16 18:48:31.000000000 +0100
+++ new/crmsh-4.0.0+git.1518010150.a58fa637/hb_report/constants.py      
2018-02-07 14:29:10.000000000 +0100
@@ -74,12 +74,16 @@
 start_stop 
Configuration.validated..Starting.heartbeat|Corosync.Cluster.Engine|Executive.Service.RELEASE|Requesting.shutdown|Shutdown.complete
 """
 
-PACKAGES = """pacemaker libpacemaker3
+PACKAGES = """pacemaker libpacemaker3 pacemaker-cli pacemaker-remote
 pacemaker-pygui pacemaker-pymgmt pymgmt-client
 openais libopenais2 libopenais3 corosync libcorosync4
+libcfg6 libcmap4 libcorosync_common4 libcpg4 libquorum5
+libsam4 libtotem_pg5 libvotequorum8
+corosync-qdevice corosync-qnetd
 resource-agents cluster-glue libglue2 ldirectord libqb0
 heartbeat heartbeat-common heartbeat-resources libheartbeat2
 booth
+sbd
 ocfs2-tools ocfs2-tools-o2cb ocfs2console
 ocfs2-kmp-default ocfs2-kmp-pae ocfs2-kmp-xen ocfs2-kmp-debug ocfs2-kmp-trace
 drbd drbd-kmp-xen drbd-kmp-pae drbd-kmp-default drbd-kmp-debug drbd-kmp-trace
@@ -130,6 +134,7 @@
 JOURNAL_F = "journal.log"
 MEMBERSHIP_F = "members.txt"
 PERMISSIONS_F = "permissions.txt"
+SBDCONF = "/etc/sysconfig/sbd"
 SYSINFO_F = "sysinfo.txt"
 SYSSTATS_F = "sysstats.txt"
 TIME_F = "time.txt"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.0.0+git.1516124911.d66d9d1f/hb_report/hb_report.in 
new/crmsh-4.0.0+git.1518010150.a58fa637/hb_report/hb_report.in
--- old/crmsh-4.0.0+git.1516124911.d66d9d1f/hb_report/hb_report.in      
2018-01-16 18:48:31.000000000 +0100
+++ new/crmsh-4.0.0+git.1518010150.a58fa637/hb_report/hb_report.in      
2018-02-07 14:29:10.000000000 +0100
@@ -85,8 +85,8 @@
         getstampproc = utillib.find_getstampproc(constants.HA_LOG)
         if getstampproc:
             constants.GET_STAMP_FUNC = getstampproc
-            utillib.dump_logset(constants.HA_LOG, constants.FROM_TIME, 
constants.TO_TIME, outf)
-            utillib.log_size(constants.HA_LOG, outf+'.info')
+            if utillib.dump_logset(constants.HA_LOG, constants.FROM_TIME, 
constants.TO_TIME, outf):
+                utillib.log_size(constants.HA_LOG, outf+'.info')
         else:
             utillib.log_warning("could not figure out the log format of %s" % 
constants.HA_LOG)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.0.0+git.1516124911.d66d9d1f/hb_report/utillib.py 
new/crmsh-4.0.0+git.1518010150.a58fa637/hb_report/utillib.py
--- old/crmsh-4.0.0+git.1516124911.d66d9d1f/hb_report/utillib.py        
2018-01-16 18:48:31.000000000 +0100
+++ new/crmsh-4.0.0+git.1518010150.a58fa637/hb_report/utillib.py        
2018-02-07 14:29:10.000000000 +0100
@@ -265,6 +265,7 @@
     process_list = []
     process_list.append(multiprocessing.Process(target=sys_info))
     process_list.append(multiprocessing.Process(target=sys_stats))
+    process_list.append(multiprocessing.Process(target=sbd_info))
     process_list.append(multiprocessing.Process(target=get_pe_inputs))
     process_list.append(multiprocessing.Process(target=crm_config))
     process_list.append(multiprocessing.Process(target=touch_dc))
@@ -294,12 +295,18 @@
         if l == constants.HA_LOG and l != constants.HALOG_F:
             os.symlink(constants.HALOG_F, os.path.join(constants.WORKDIR, 
os.path.basename(l)))
             continue
+        if is_our_log(l, constants.FROM_TIME, constants.TO_TIME) == 4:
+            log_warning("found irregular log file %s" % l)
+            outf = os.path.join(constants.WORKDIR, os.path.basename(l))
+            shutil.copy2(l, constants.WORKDIR)
+            log_size(l, outf+'.info')
+            continue
         getstampproc = find_getstampproc(l)
         if getstampproc:
             constants.GET_STAMP_FUNC = getstampproc
             outf = os.path.join(constants.WORKDIR, os.path.basename(l))
-            dump_logset(l, constants.FROM_TIME, constants.TO_TIME, outf)
-            log_size(l, outf+'.info')
+            if dump_logset(l, constants.FROM_TIME, constants.TO_TIME, outf):
+                log_size(l, outf+'.info')
         else:
             log_warning("could not figure out the log format of %s" % l)
 
@@ -425,8 +432,21 @@
 
 
 def dlm_dump():
-    # TODO
-    pass
+    """
+    get dlm info
+    """
+    if which("dlm_tool"):
+        out_string = "##### NOTICE - Lockspace overview:\n"
+        out_string += get_command_info("dlm_tool ls")[1] + '\n'
+        for item in grep("^name", incmd="dlm_tool ls"):
+            lock_name = item.split()[1]
+            out_string += "## NOTICE - Lockspace {}\n".format(lock_name)
+            out_string += get_command_info("dlm_tool lockdump 
{}".format(lock_name))[1] + '\n'
+        out_string += "##### NOTICE - Lockspace history:\n"
+        out_string += get_command_info("dlm_tool dump")[1] + '\n'
+
+        dlm_f = os.path.join(constants.WORKDIR, constants.DLM_DUMP_F)
+        crmutils.str2file(out_string, dlm_f)
 
 
 def drop_tempfiles():
@@ -453,10 +473,10 @@
     find log/set of logs which are interesting for us
     """
     if os.stat(logf).st_size == 0:
-        return
+        return False
     logf_set = arch_logs(logf, from_time, to_time)
     if not logf_set:
-        return
+        return False
     num_logs = len(logf_set)
     oldest = logf_set[-1]
     newest = logf_set[0]
@@ -476,6 +496,7 @@
         out_string += print_logseg(newest, 0, to_time)
 
     crmutils.str2file(out_string, outf)
+    return True
 
 
 def dump_state(workdir):
@@ -1157,6 +1178,8 @@
         last_time = find_first_ts(tail(10, data))
 
     if (not first_time) or (not last_time):
+        if os.stat(logf).st_size > 0:
+            return 4 # irregular log, not empty
         return 0  # skip (empty log?)
     if from_time > last_time:
         # we shouldn't get here anyway if the logs are in order
@@ -1439,6 +1462,14 @@
         return constants.SSH_USER
 
 
+def sbd_info():
+    """
+    save sbd configuration file
+    """
+    if os.path.exists(constants.SBDCONF):
+        shutil.copy2(constants.SBDCONF, constants.WORKDIR)
+
+
 def sed_inplace(filename, pattern, repl):
     out_string = ""
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.0.0+git.1516124911.d66d9d1f/test/run-in-container.sh 
new/crmsh-4.0.0+git.1518010150.a58fa637/test/run-in-container.sh
--- old/crmsh-4.0.0+git.1516124911.d66d9d1f/test/run-in-container.sh    
2018-01-16 18:48:31.000000000 +0100
+++ new/crmsh-4.0.0+git.1518010150.a58fa637/test/run-in-container.sh    
2018-02-07 14:29:10.000000000 +0100
@@ -4,7 +4,7 @@
 ouid=$2
 ogid=$3
 
-cat /etc/group | awk '{ FS = ":" } { print $3 }' | grep -q $ogid || groupadd 
-g $ogid
+cat /etc/group | awk '{ FS = ":" } { print $3 }' | grep -q "$ogid" || groupadd 
-g "$ogid"
 id -u $oname >/dev/null 2>&1 || useradd -u $ouid -g $ogid $oname
 
 unit_tests() {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.0.0+git.1516124911.d66d9d1f/test/run-in-travis.sh 
new/crmsh-4.0.0+git.1518010150.a58fa637/test/run-in-travis.sh
--- old/crmsh-4.0.0+git.1516124911.d66d9d1f/test/run-in-travis.sh       
1970-01-01 01:00:00.000000000 +0100
+++ new/crmsh-4.0.0+git.1518010150.a58fa637/test/run-in-travis.sh       
2018-02-07 14:29:10.000000000 +0100
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+unit_tests() {
+       echo "** Unit tests"
+       ./test/run
+}
+
+configure() {
+       echo "** Autogen / Configure"
+       ./autogen.sh
+       ./configure --prefix /usr
+}
+
+make_install() {
+       echo "** Make / Install"
+       make install
+}
+
+regression_tests() {
+       echo "** Regression tests"
+       sh /usr/share/crmsh/tests/regression.sh
+}
+
+unit_tests
+configure
+make_install
+regression_tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.0.0+git.1516124911.d66d9d1f/test/testcases/bundle.exp 
new/crmsh-4.0.0+git.1518010150.a58fa637/test/testcases/bundle.exp
--- old/crmsh-4.0.0+git.1516124911.d66d9d1f/test/testcases/bundle.exp   
2018-01-16 18:48:31.000000000 +0100
+++ new/crmsh-4.0.0+git.1518010150.a58fa637/test/testcases/bundle.exp   
2018-02-07 14:29:10.000000000 +0100
@@ -14,7 +14,6 @@
 .INP: bundle id=bundle-test2 docker image=test network 
ip-range-start=10.10.10.123 primitive dummy meta target-role=Stopped priority=1
 .INP: property stonith-enabled=true
 .INP: _test
-ERROR: 15: object bundle-test2 does not reference its child dummy
 .INP: verify
 .EXT crm_resource --show-metadata stonith:ssh
 .EXT stonithd metadata
@@ -37,8 +36,6 @@
        op monitor interval=60m timeout=60s
 primitive st2 stonith:ssh \
        params hostlist="node1 node2"
-property cib-bootstrap-options: \
-       stonith-enabled=true
 bundle bundle-test1 \
        docker image=test \
        network ip-range-start=10.10.10.123 port-mapping id=port1 port=80 \
@@ -49,4 +46,6 @@
        network ip-range-start=10.10.10.123 \
        primitive dummy \
        meta target-role=Stopped priority=1
+property cib-bootstrap-options: \
+       stonith-enabled=true
 .INP: commit


Reply via email to