Hello community,

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

Package is "crmsh"

Tue Aug  4 20:23:54 2020 rev:189 rq:824235 version:4.2.0+git.1595940615.c452cc00

Changes:
--------
--- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes      2020-07-24 
10:09:12.138124654 +0200
+++ /work/SRC/openSUSE:Factory/.crmsh.new.3592/crmsh.changes    2020-08-04 
20:24:14.117019079 +0200
@@ -1,0 +2,8 @@
+Tue Jul 28 13:02:41 UTC 2020 - xli...@suse.com
+
+- Update to version 4.2.0+git.1595940615.c452cc00:
+  * Dev: unittest: test the case which command "crm corosync status quorum" 
return code is 2
+  * Dev: behave: use "crm corosync status quorum" to check the quorum status
+  * Low: corosync: handle the return code of corosync-quorumtool 
correctly(bsc#1174588)
+
+-------------------------------------------------------------------

Old:
----
  crmsh-4.2.0+git.1595517298.a06e892f.tar.bz2

New:
----
  crmsh-4.2.0+git.1595940615.c452cc00.tar.bz2

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

Other differences:
------------------
++++++ crmsh.spec ++++++
--- /var/tmp/diff_new_pack.n82rLD/_old  2020-08-04 20:24:15.465019534 +0200
+++ /var/tmp/diff_new_pack.n82rLD/_new  2020-08-04 20:24:15.465019534 +0200
@@ -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.1595517298.a06e892f
+Version:        4.2.0+git.1595940615.c452cc00
 Release:        0
 Url:            http://crmsh.github.io
 Source0:        %{name}-%{version}.tar.bz2

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.n82rLD/_old  2020-08-04 20:24:15.513019550 +0200
+++ /var/tmp/diff_new_pack.n82rLD/_new  2020-08-04 20:24:15.513019550 +0200
@@ -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">314ca14d291ce6c6856ff4571b6e59b3d4df9f10</param></service></servicedata>
\ No newline at end of file
+              <param 
name="changesrevision">5350f49f9e5990568c2626a6b02446dcbfbca340</param></service></servicedata>
\ No newline at end of file

++++++ crmsh-4.2.0+git.1595517298.a06e892f.tar.bz2 -> 
crmsh-4.2.0+git.1595940615.c452cc00.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.2.0+git.1595517298.a06e892f/crmsh/corosync.py 
new/crmsh-4.2.0+git.1595940615.c452cc00/crmsh/corosync.py
--- old/crmsh-4.2.0+git.1595517298.a06e892f/crmsh/corosync.py   2020-07-23 
17:14:58.000000000 +0200
+++ new/crmsh-4.2.0+git.1595940615.c452cc00/crmsh/corosync.py   2020-07-28 
14:50:15.000000000 +0200
@@ -66,12 +66,15 @@
 def query_quorum_status():
     """
     Query corosync quorum status
+
     """
     utils.print_cluster_nodes()
     rc, out, err = utils.get_stdout_stderr("corosync-quorumtool -s")
     if rc != 0 and err:
         raise ValueError(err)
-    if rc == 0 and out:
+    # If the return code of corosync-quorumtool is 2,
+    # that means no problem appeared but node is not quorate
+    if rc in [0, 2] and out:
         print(out)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.2.0+git.1595517298.a06e892f/test/features/qdevice_usercase.feature 
new/crmsh-4.2.0+git.1595940615.c452cc00/test/features/qdevice_usercase.feature
--- 
old/crmsh-4.2.0+git.1595517298.a06e892f/test/features/qdevice_usercase.feature  
    2020-07-23 17:14:58.000000000 +0200
+++ 
new/crmsh-4.2.0+git.1595940615.c452cc00/test/features/qdevice_usercase.feature  
    2020-07-28 14:50:15.000000000 +0200
@@ -55,9 +55,9 @@
     And     Run "iptables -I INPUT -s 172.17.0.2 -j DROP; iptables -I OUTPUT 
-d 172.17.0.2 -j DROP" on "hanode2"
     # Check whether hanode1 has quorum, while hanode2 doesn't
     And     Run "sleep 20" on "hanode1"
-    When    Run "corosync-quorumtool -s" on "hanode1"
+    When    Run "crm corosync status quorum" on "hanode1"
     Then    Expected "Quorate:          Yes" in stdout
-    When    Run "ssh root@hanode2 corosync-quorumtool -s" on "hanode1"
+    When    Run "crm corosync status quorum" on "hanode2"
     Then    Expected "Quorate:          No" in stdout
     And     Show cluster status on "hanode1"
     And     Show cluster status on "hanode2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.2.0+git.1595517298.a06e892f/test/unittests/test_corosync.py 
new/crmsh-4.2.0+git.1595940615.c452cc00/test/unittests/test_corosync.py
--- old/crmsh-4.2.0+git.1595517298.a06e892f/test/unittests/test_corosync.py     
2020-07-23 17:14:58.000000000 +0200
+++ new/crmsh-4.2.0+git.1595940615.c452cc00/test/unittests/test_corosync.py     
2020-07-28 14:50:15.000000000 +0200
@@ -101,6 +101,15 @@
     mock_print_nodes.assert_called_once_with()
 
 
+@mock.patch("crmsh.utils.print_cluster_nodes")
+@mock.patch("crmsh.utils.get_stdout_stderr")
+def test_query_quorum_status_no_quorum(mock_run, mock_print_nodes):
+    mock_run.return_value = (2, "no quorum", None)
+    corosync.query_quorum_status()
+    mock_run.assert_called_once_with("corosync-quorumtool -s")
+    mock_print_nodes.assert_called_once_with()
+
+
 @mock.patch("crmsh.utils.is_qdevice_configured")
 def test_query_qnetd_status_no_qdevice(mock_qdevice_configured):
     mock_qdevice_configured.return_value = False


Reply via email to