Hello community,

here is the log from the commit of package crmsh for openSUSE:Factory checked 
in at 2020-01-07 23:53:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crmsh (Old)
 and      /work/SRC/openSUSE:Factory/.crmsh.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "crmsh"

Tue Jan  7 23:53:20 2020 rev:171 rq:761367 version:4.2.0+git.1578387778.867a085b

Changes:
--------
--- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes      2019-12-24 
14:30:55.934604182 +0100
+++ /work/SRC/openSUSE:Factory/.crmsh.new.6675/crmsh.changes    2020-01-07 
23:53:51.752047166 +0100
@@ -1,0 +2,13 @@
+Tue Jan 07 09:13:02 UTC 2020 - xli...@suse.com
+
+- Update to version 4.2.0+git.1578387778.867a085b:
+  * Dev: bootstrap: Maximum number of SBD device is 3
+  * Dev: bootstrap: improve multi disk sbd usability support both '-s device1 
-s device2' and '-s "device1;device2"' improve the logic of code
+
+-------------------------------------------------------------------
+Fri Jan 03 06:04:25 UTC 2020 - xli...@suse.com
+
+- Update to version 4.2.0+git.1578030883.465b4212:
+  * dev: unittest: fix test_report.py failing in 2020
+
+-------------------------------------------------------------------

Old:
----
  crmsh-4.2.0+git.1577086871.f544180c.tar.bz2

New:
----
  crmsh-4.2.0+git.1578387778.867a085b.tar.bz2

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

Other differences:
------------------
++++++ crmsh.spec ++++++
--- /var/tmp/diff_new_pack.EDoXw0/_old  2020-01-07 23:53:52.620047616 +0100
+++ /var/tmp/diff_new_pack.EDoXw0/_new  2020-01-07 23:53:52.624047618 +0100
@@ -36,7 +36,7 @@
 Summary:        High Availability cluster command-line interface
 License:        GPL-2.0-or-later
 Group:          %{pkg_group}
-Version:        4.2.0+git.1577086871.f544180c
+Version:        4.2.0+git.1578387778.867a085b
 Release:        0
 Url:            http://crmsh.github.io
 Source0:        %{name}-%{version}.tar.bz2

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.EDoXw0/_old  2020-01-07 23:53:52.724047670 +0100
+++ /var/tmp/diff_new_pack.EDoXw0/_new  2020-01-07 23:53:52.740047678 +0100
@@ -5,4 +5,4 @@
                 <param 
name="url">https://github.com/liangxin1300/crmsh.git</param>
               <param 
name="changesrevision">d8dc51b4cb34964aa72e918999ebc7f03b48f3c9</param></service><service
 name="tar_scm">
                 <param 
name="url">https://github.com/ClusterLabs/crmsh.git</param>
-              <param 
name="changesrevision">d10d2fbdd1b357500387bebb432c68e88748526b</param></service></servicedata>
\ No newline at end of file
+              <param 
name="changesrevision">867a085b5d7e710060d7381cd34c4634760c2462</param></service></servicedata>
\ No newline at end of file

++++++ crmsh-4.2.0+git.1577086871.f544180c.tar.bz2 -> 
crmsh-4.2.0+git.1578387778.867a085b.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.2.0+git.1577086871.f544180c/crmsh/bootstrap.py 
new/crmsh-4.2.0+git.1578387778.867a085b/crmsh/bootstrap.py
--- old/crmsh-4.2.0+git.1577086871.f544180c/crmsh/bootstrap.py  2019-12-23 
08:41:11.000000000 +0100
+++ new/crmsh-4.2.0+git.1578387778.867a085b/crmsh/bootstrap.py  2020-01-07 
10:02:58.000000000 +0100
@@ -1321,10 +1321,29 @@
     SBD can also run in diskless mode if no device
     is configured.
     """
-    if not _context.sbd_device and _context.diskless_sbd:
+    def get_dev_list(dev_list):
+        result_list = []
+        for dev in dev_list:
+            if ';' in dev:
+                result_list.extend(dev.strip(';').split(';'))
+            else:
+                result_list.append(dev)
+        return result_list
+
+    # non-interactive case
+    if _context.sbd_device:
+        _context.sbd_device = get_dev_list(_context.sbd_device)
+        if len(_context.sbd_device) > 3:
+            error("Maximum number of SBD device is 3")
+        for dev in _context.sbd_device:
+            if not is_block_device(dev):
+                error("{} doesn't look like a block device".format(dev))
+    # diskless sbd
+    elif _context.diskless_sbd:
         init_sbd_diskless()
         return
-    elif not _context.sbd_device:
+    # interactive case
+    else:
         # SBD device not set up by init_storage (ocfs2 template) and
         # also not passed in as command line argument - prompt user
         if _context.yes_to_all:
@@ -1370,9 +1389,12 @@
                 init_sbd_diskless()
                 return
             dev_list = dev.strip(';').split(';')
+            if len(dev_list) > 3:
+                error("Maximum number of SBD device is 3")
+                continue
             for dev_item in dev_list:
                 if not is_block_device(dev_item):
-                    print("    {} doesn't look like a block 
device".format(dev_item), file=sys.stderr)
+                    error("{} doesn't look like a block 
device".format(dev_item))
                     dev_looks_sane = False
                     break
                 else:
@@ -1385,10 +1407,6 @@
 
         _context.sbd_device = dev_list
 
-    for dev in _context.sbd_device:
-        if not is_block_device(dev):
-            error("SBD device %s doesn't seem to exist" % (dev))
-
     # TODO: need to ensure watchdog is available
     # (actually, should work if watchdog unavailable, it'll just whine in the 
logs...)
     # TODO: what about timeouts for multipath devices?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.2.0+git.1577086871.f544180c/crmsh/ui_cluster.py 
new/crmsh-4.2.0+git.1578387778.867a085b/crmsh/ui_cluster.py
--- old/crmsh-4.2.0+git.1577086871.f544180c/crmsh/ui_cluster.py 2019-12-23 
08:41:11.000000000 +0100
+++ new/crmsh-4.2.0+git.1578387778.867a085b/crmsh/ui_cluster.py 2020-01-07 
10:02:58.000000000 +0100
@@ -244,7 +244,7 @@
         storage_group.add_option("-p", "--partition-device", 
dest="shared_device", metavar="DEVICE",
                                  help='Partition this shared storage device 
(only used in "storage" stage)')
         storage_group.add_option("-s", "--sbd-device", dest="sbd_device", 
metavar="DEVICE", action="append",
-                                 help="Block device to use for SBD fencing, 
use \";\" as separator for multi path")
+                                 help="Block device to use for SBD fencing, 
use \";\" as separator or -s multiple times for multi path (up to 3 devices)")
         storage_group.add_option("-o", "--ocfs2-device", dest="ocfs2_device", 
metavar="DEVICE",
                                  help='Block device to use for OCFS2 (only 
used in "vgfs" stage)')
         parser.add_option_group(storage_group)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.2.0+git.1577086871.f544180c/test/unittests/test_report.py 
new/crmsh-4.2.0+git.1578387778.867a085b/test/unittests/test_report.py
--- old/crmsh-4.2.0+git.1577086871.f544180c/test/unittests/test_report.py       
2019-12-23 08:41:11.000000000 +0100
+++ new/crmsh-4.2.0+git.1578387778.867a085b/test/unittests/test_report.py       
2020-01-07 10:02:58.000000000 +0100
@@ -1,6 +1,7 @@
 import sys
 import os
 import shutil
+from datetime import datetime
 from nose.tools import eq_, ok_
 
 from hb_report.utillib import which, ts_to_dt, sub_string, random_string,\
@@ -22,10 +23,11 @@
 evil_unicode_log = "evil_unicode.txt"
 invalid_utf8 = b'Apr 03 11:01:18 [13042] \xe5abc\nApr 03 11:01:18 [13042] 
test\xe5'
 
-time_before = crmsh.utils.parse_to_timestamp("2019/04/03 11:01:00")
-time_after = crmsh.utils.parse_to_timestamp("2019/04/03 14:00:00")
-time_between = crmsh.utils.parse_to_timestamp("2019/04/03 12:03:31")
-first_time = crmsh.utils.parse_to_timestamp("2019/04/03 11:01:18")
+year = datetime.now().year
+time_before = crmsh.utils.parse_to_timestamp("%d/04/03 11:01:00" % year)
+time_after = crmsh.utils.parse_to_timestamp("%d/04/03 14:00:00" % year)
+time_between = crmsh.utils.parse_to_timestamp("%d/04/03 12:03:31" % year)
+first_time = crmsh.utils.parse_to_timestamp("%d/04/03 11:01:18" % year)
 
 line5424_1 = r"2017-01-26T11:04:19.562885+08:00 12sp2-4 kernel: [    0.000000]"
 line5424_2 = r"2017-07-10T01:33:54.993374+08:00 12sp2-1 pengine[2020]:   
notice: Calculated transition 221"
@@ -133,7 +135,7 @@
 def test_find_first_ts():
     with open(pacemaker_log, 'r') as f:
         res = find_first_ts(f.read().split('\n'))
-        eq_(ts_to_dt(res).strftime("%Y/%m/%d %H:%M:%S"), "2019/04/03 11:01:18")
+        eq_(ts_to_dt(res).strftime("%Y/%m/%d %H:%M:%S"), "%d/04/03 11:01:18" % 
year)
 
 
 def test_find_files():
@@ -298,15 +300,15 @@
 
 
 def test_line_time():
-    eq_(ts_to_dt(line_time(pacemaker_log, 2)).strftime("%Y/%m/%d %H:%M:%S"), 
"2019/04/03 11:01:18")
-    eq_(ts_to_dt(line_time(pacemaker_log, 195)).strftime("%Y/%m/%d %H:%M:%S"), 
"2019/04/03 11:01:40")
+    eq_(ts_to_dt(line_time(pacemaker_log, 2)).strftime("%Y/%m/%d %H:%M:%S"), 
"%d/04/03 11:01:18" % year)
+    eq_(ts_to_dt(line_time(pacemaker_log, 195)).strftime("%Y/%m/%d 
%H:%M:%S"),"%d/04/03 11:01:40" % year)
 
 
 def test_line_time_unicode():
-    eq_(ts_to_dt(line_time(pacemaker_unicode_log, 3)).strftime("%Y/%m/%d 
%H:%M:%S"), "2019/04/03 11:01:18")
+    eq_(ts_to_dt(line_time(pacemaker_unicode_log, 3)).strftime("%Y/%m/%d 
%H:%M:%S"), "%d/04/03 11:01:18" % year)
     with open(evil_unicode_log, 'wb') as f:
         f.write(invalid_utf8)
-    eq_(ts_to_dt(line_time(evil_unicode_log, 1)).strftime("%Y/%m/%d 
%H:%M:%S"), "2019/04/03 11:01:18")
+    eq_(ts_to_dt(line_time(evil_unicode_log, 1)).strftime("%Y/%m/%d 
%H:%M:%S"), "%d/04/03 11:01:18" % year)
     os.remove(evil_unicode_log)
 
 


Reply via email to