Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2022-09-19 16:03:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crmsh (Old) and /work/SRC/openSUSE:Factory/.crmsh.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh" Mon Sep 19 16:03:49 2022 rev:258 rq:1004524 version:4.4.1+20220915.afcd88e6 Changes: -------- --- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2022-09-14 13:44:51.905876575 +0200 +++ /work/SRC/openSUSE:Factory/.crmsh.new.2083/crmsh.changes 2022-09-19 16:03:56.794248104 +0200 @@ -1,0 +2,13 @@ +Thu Sep 15 12:48:47 UTC 2022 - xli...@suse.com + +- Update to version 4.4.1+20220915.afcd88e6: + * Dev: behave: Add functional test case based on previous changes + * Dev: bootstrap: Adjust sbd related timeout when add/remove qdevice + +------------------------------------------------------------------- +Wed Sep 14 06:00:41 UTC 2022 - xli...@suse.com + +- Update to version 4.4.1+20220914.fa29aa2c: + * Fix: crash_test: do not use firewalld to isolate a cluster node (bsc#1192467) + +------------------------------------------------------------------- Old: ---- crmsh-4.4.1+20220913.57fa9d96.tar.bz2 New: ---- crmsh-4.4.1+20220915.afcd88e6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.spec ++++++ --- /var/tmp/diff_new_pack.EQPSSp/_old 2022-09-19 16:03:57.410249750 +0200 +++ /var/tmp/diff_new_pack.EQPSSp/_new 2022-09-19 16:03:57.414249761 +0200 @@ -36,7 +36,7 @@ Summary: High Availability cluster command-line interface License: GPL-2.0-or-later Group: %{pkg_group} -Version: 4.4.1+20220913.57fa9d96 +Version: 4.4.1+20220915.afcd88e6 Release: 0 URL: http://crmsh.github.io Source0: %{name}-%{version}.tar.bz2 ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.EQPSSp/_old 2022-09-19 16:03:57.458249878 +0200 +++ /var/tmp/diff_new_pack.EQPSSp/_new 2022-09-19 16:03:57.462249889 +0200 @@ -9,7 +9,7 @@ </service> <service name="tar_scm"> <param name="url">https://github.com/ClusterLabs/crmsh.git</param> - <param name="changesrevision">57fa9d96091d03ead44b36d733ff41cd697f5284</param> + <param name="changesrevision">46ff3da7a92920e3e0e73d69c73e51a8846fd223</param> </service> </servicedata> (No newline at EOF) ++++++ crmsh-4.4.1+20220913.57fa9d96.tar.bz2 -> crmsh-4.4.1+20220915.afcd88e6.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20220913.57fa9d96/crmsh/bootstrap.py new/crmsh-4.4.1+20220915.afcd88e6/crmsh/bootstrap.py --- old/crmsh-4.4.1+20220913.57fa9d96/crmsh/bootstrap.py 2022-09-13 09:37:22.000000000 +0200 +++ new/crmsh-4.4.1+20220915.afcd88e6/crmsh/bootstrap.py 2022-09-15 14:33:01.000000000 +0200 @@ -1375,6 +1375,10 @@ qdevice_inst.config_and_start_qdevice() + if _context.stage == "qdevice" and utils.service_is_active("sbd.service"): + from .sbd import SBDTimeout + SBDTimeout.adjust_sbd_timeout_related_cluster_configuration() + def init(): """ @@ -2174,6 +2178,10 @@ else: logger.warning("To remove qdevice service, need to restart cluster service manually on each node") + if utils.service_is_active("sbd.service"): + from .sbd import SBDTimeout + SBDTimeout.adjust_sbd_timeout_related_cluster_configuration() + def bootstrap_remove(context): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20220913.57fa9d96/crmsh/crash_test/main.py new/crmsh-4.4.1+20220915.afcd88e6/crmsh/crash_test/main.py --- old/crmsh-4.4.1+20220913.57fa9d96/crmsh/crash_test/main.py 2022-09-13 09:37:22.000000000 +0200 +++ new/crmsh-4.4.1+20220915.afcd88e6/crmsh/crash_test/main.py 2022-09-15 14:33:01.000000000 +0200 @@ -155,7 +155,7 @@ group_mutual.add_argument('--fence-node', dest='fence_node', metavar='NODE', help='Fence specific node') group_mutual.add_argument('--split-brain-iptables', dest='sp_iptables', action='store_true', - help='Make split brain by blocking corosync ports') + help='Make split brain by blocking traffic between cluster nodes') parser.add_argument('-l', '--kill-loop', dest='loop', action='store_true', help='Kill process in loop') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20220913.57fa9d96/crmsh/crash_test/task.py new/crmsh-4.4.1+20220915.afcd88e6/crmsh/crash_test/task.py --- old/crmsh-4.4.1+20220913.57fa9d96/crmsh/crash_test/task.py 2022-09-13 09:37:22.000000000 +0200 +++ new/crmsh-4.4.1+20220915.afcd88e6/crmsh/crash_test/task.py 2022-09-15 14:33:01.000000000 +0200 @@ -437,14 +437,14 @@ class TaskSplitBrain(Task): """ - Class to define how to simulate split brain by blocking corosync ports + Class to define how to simulate split brain by blocking traffic between cluster nodes """ def __init__(self, force=False): """ Init function """ - self.description = "Simulate split brain by blocking corosync ports" + self.description = "Simulate split brain by blocking traffic between cluster nodes" self.expected = "One of nodes get fenced" self.ports = [] self.peer_nodelist = [] @@ -493,27 +493,12 @@ """ Context manager to block and unblock ip/ports """ - self.firewalld_enabled = crmshutils.service_is_active("firewalld.service") - if self.firewalld_enabled: - self.do_block_firewalld() - else: - self.do_block_iptables() + self.do_block_iptables() try: yield finally: self.un_block() - def do_block_firewalld(self): - """ - Block corosync ports - """ - self.ports = utils.corosync_port_list() - if not self.ports: - raise TaskError("Can not get corosync's port") - self.info("Trying to temporarily block port {}".format(','.join(self.ports))) - for p in self.ports: - crmshutils.get_stdout_stderr(config.REMOVE_PORT.format(port=p)) - def do_block_iptables(self): """ Block corosync communication ip @@ -528,18 +513,7 @@ """ Unblock corosync ip/ports """ - if self.firewalld_enabled: - self.un_block_firewalld() - else: - self.un_block_iptables() - - def un_block_firewalld(self): - """ - Unblock corosync ports - """ - self.info("Trying to add port {}".format(','.join(self.ports))) - for p in self.ports: - crmshutils.get_stdout_stderr(config.ADD_PORT.format(port=p)) + self.un_block_iptables() def un_block_iptables(self): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20220913.57fa9d96/crmsh/sbd.py new/crmsh-4.4.1+20220915.afcd88e6/crmsh/sbd.py --- old/crmsh-4.4.1+20220913.57fa9d96/crmsh/sbd.py 2022-09-13 09:37:22.000000000 +0200 +++ new/crmsh-4.4.1+20220915.afcd88e6/crmsh/sbd.py 2022-09-15 14:33:01.000000000 +0200 @@ -258,7 +258,7 @@ cls_inst = cls(removing=removing) cls_inst._load_configurations() - message = "Adjusting sbd related timeout values for 2-node cluster" + message = "Adjusting sbd related timeout values" with logger_utils.status_long(message): cls_inst.adjust_sbd_delay_start() cls_inst.adjust_pcmk_delay_max() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20220913.57fa9d96/test/features/bootstrap_sbd_delay.feature new/crmsh-4.4.1+20220915.afcd88e6/test/features/bootstrap_sbd_delay.feature --- old/crmsh-4.4.1+20220913.57fa9d96/test/features/bootstrap_sbd_delay.feature 2022-09-13 09:37:22.000000000 +0200 +++ new/crmsh-4.4.1+20220915.afcd88e6/test/features/bootstrap_sbd_delay.feature 2022-09-15 14:33:01.000000000 +0200 @@ -229,3 +229,23 @@ And SBD option "SBD_WATCHDOG_TIMEOUT" value is "35" And Cluster property "stonith-timeout" is "95" And Cluster property "stonith-watchdog-timeout" is "-1" + + @clean + Scenario: Add and remove qdevice from cluster with sbd running + Given Cluster service is "stopped" on "hanode1" + Given Cluster service is "stopped" on "hanode2" + When Run "crm cluster init -s /dev/sda1 -y" on "hanode1" + Then Cluster service is "started" on "hanode1" + When Run "crm cluster join -c hanode1 -y" on "hanode2" + Then Cluster service is "started" on "hanode2" + And Service "sbd" is "started" on "hanode1" + And Service "sbd" is "started" on "hanode2" + And Parameter "pcmk_delay_max" configured in "stonith-sbd" + When Run "crm cluster init qdevice --qnetd-hostname=qnetd-node -y" on "hanode1" + Then Service "corosync-qdevice" is "started" on "hanode1" + And Service "corosync-qdevice" is "started" on "hanode2" + And Parameter "pcmk_delay_max" not configured in "stonith-sbd" + When Run "crm cluster remove --qdevice -y" on "hanode1" + Then Service "corosync-qdevice" is "stopped" on "hanode1" + And Service "corosync-qdevice" is "stopped" on "hanode2" + And Parameter "pcmk_delay_max" configured in "stonith-sbd" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20220913.57fa9d96/test/unittests/test_crashtest_task.py new/crmsh-4.4.1+20220915.afcd88e6/test/unittests/test_crashtest_task.py --- old/crmsh-4.4.1+20220913.57fa9d96/test/unittests/test_crashtest_task.py 2022-09-13 09:37:22.000000000 +0200 +++ new/crmsh-4.4.1+20220915.afcd88e6/test/unittests/test_crashtest_task.py 2022-09-15 14:33:01.000000000 +0200 @@ -327,7 +327,7 @@ def test_header(self): expected_res = """============================================== -Testcase: Simulate split brain by blocking corosync ports +Testcase: Simulate split brain by blocking traffic between cluster nodes Expected Result: One of nodes get fenced Fence action: reboot Fence timeout: 60 @@ -365,46 +365,6 @@ mock_run.assert_called_once_with("which iptables") mock_online_nodes.assert_called_once_with() - @mock.patch('crmsh.crash_test.task.crmshutils.service_is_active') - def test_do_block_firewalld_disactive(self, mock_active): - mock_active.return_value = False - self.task_sp_inst.do_block_iptables = mock.Mock() - self.task_sp_inst.un_block = mock.Mock() - with self.task_sp_inst.do_block(): - pass - mock_active.assert_called_once_with("firewalld.service") - self.task_sp_inst.do_block_iptables.assert_called_once_with() - self.task_sp_inst.un_block.assert_called_once_with() - - @mock.patch('crmsh.crash_test.task.crmshutils.service_is_active') - def test_do_block_firewalld_active(self, mock_active): - mock_active.return_value = True - self.task_sp_inst.do_block_firewalld = mock.Mock() - self.task_sp_inst.un_block = mock.Mock() - with self.task_sp_inst.do_block(): - pass - mock_active.assert_called_once_with("firewalld.service") - self.task_sp_inst.do_block_firewalld.assert_called_once_with() - self.task_sp_inst.un_block.assert_called_once_with() - - @mock.patch('crmsh.crash_test.utils.corosync_port_list') - def test_do_block_firewalld_error(self, mock_port_list): - mock_port_list.return_value = [] - with self.assertRaises(task.TaskError) as err: - self.task_sp_inst.do_block_firewalld() - self.assertEqual("Can not get corosync's port", str(err.exception)) - mock_port_list.assert_called_once_with() - - @mock.patch('crmsh.crash_test.task.crmshutils.get_stdout_stderr') - @mock.patch('crmsh.crash_test.task.Task.info') - @mock.patch('crmsh.crash_test.utils.corosync_port_list') - def test_do_block_firewalld(self, mock_port_list, mock_info, mock_run): - mock_port_list.return_value = ["1234"] - self.task_sp_inst.do_block_firewalld() - mock_port_list.assert_called_once_with() - mock_info.assert_called_once_with("Trying to temporarily block port 1234") - mock_run.assert_called_once_with(config.REMOVE_PORT.format(port=1234)) - @mock.patch('crmsh.crash_test.task.crmshutils.get_stdout_stderr') @mock.patch('crmsh.crash_test.task.crmshutils.get_iplist_from_name') @mock.patch('crmsh.crash_test.task.Task.info') @@ -429,30 +389,12 @@ mock.call(config.BLOCK_IP.format(action='I', peer_ip="20.20.20.2")) ]) - @mock.patch('crmsh.crash_test.task.TaskSplitBrain.un_block_firewalld') - def test_un_block_firewalld_enabled(self, mock_unblock_firewalld): - self.task_sp_inst.firewalld_enabled = True - self.task_sp_inst.un_block() - mock_unblock_firewalld.assert_called_once_with() - @mock.patch('crmsh.crash_test.task.TaskSplitBrain.un_block_iptables') def test_un_block(self, mock_unblock_iptables): - self.task_sp_inst.firewalld_enabled = False self.task_sp_inst.un_block() mock_unblock_iptables.assert_called_once_with() @mock.patch('crmsh.crash_test.task.crmshutils.get_stdout_stderr') - @mock.patch('crmsh.crash_test.task.Task.info') - def test_un_block_firewalld(self, mock_info, mock_run): - self.task_sp_inst.ports = ["5405", "5407"] - self.task_sp_inst.un_block_firewalld() - mock_info.assert_called_once_with("Trying to add port 5405,5407") - mock_run.assert_has_calls([ - mock.call(config.ADD_PORT.format(port=5405)), - mock.call(config.ADD_PORT.format(port=5407)) - ]) - - @mock.patch('crmsh.crash_test.task.crmshutils.get_stdout_stderr') @mock.patch('crmsh.crash_test.task.crmshutils.get_iplist_from_name') @mock.patch('crmsh.crash_test.task.Task.info') def test_un_block_iptables(self, mock_info, mock_get_iplist, mock_run):