Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2021-10-12 21:49:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crmsh (Old) and /work/SRC/openSUSE:Factory/.crmsh.new.2443 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh" Tue Oct 12 21:49:56 2021 rev:222 rq:924881 version:4.3.1+20211012.4e74e9d1 Changes: -------- --- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2021-09-13 16:25:18.174798243 +0200 +++ /work/SRC/openSUSE:Factory/.crmsh.new.2443/crmsh.changes 2021-10-12 21:51:18.664039877 +0200 @@ -1,0 +2,15 @@ +Tue Oct 12 09:18:09 UTC 2021 - xli...@suse.com + +- Update to version 4.3.1+20211012.4e74e9d1: + * Dev: testcases: Change origin testcases for previous change + * Dev: CI: change docker image as leap 15.2, and enlarge the timeout value for each CI case + * Fix: ui_resource: Parse lifetime option correctly (bsc#1191508) + +------------------------------------------------------------------- +Thu Sep 16 05:11:54 UTC 2021 - xli...@suse.com + +- Update to version 4.3.1+20210916.1b3e21cc: + * Dev: unittest: Change unit test for previous changes + * Fix: bootstrap: Add /etc/crm/crm.conf and /etc/crm/profiles.yml into /etc/csync2/csync2.cfg (bsc#1190466) + +------------------------------------------------------------------- Old: ---- crmsh-4.3.1+20210913.d7356663.tar.bz2 New: ---- crmsh-4.3.1+20211012.4e74e9d1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.spec ++++++ --- /var/tmp/diff_new_pack.AyRPO5/_old 2021-10-12 21:51:19.344040851 +0200 +++ /var/tmp/diff_new_pack.AyRPO5/_new 2021-10-12 21:51:19.348040857 +0200 @@ -36,7 +36,7 @@ Summary: High Availability cluster command-line interface License: GPL-2.0-or-later Group: %{pkg_group} -Version: 4.3.1+20210913.d7356663 +Version: 4.3.1+20211012.4e74e9d1 Release: 0 URL: http://crmsh.github.io Source0: %{name}-%{version}.tar.bz2 ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.AyRPO5/_old 2021-10-12 21:51:19.396040925 +0200 +++ /var/tmp/diff_new_pack.AyRPO5/_new 2021-10-12 21:51:19.396040925 +0200 @@ -9,6 +9,6 @@ </service> <service name="tar_scm"> <param name="url">https://github.com/ClusterLabs/crmsh.git</param> - <param name="changesrevision">8f7fe294bc69113e189495ef4d55a39b78aeae95</param> + <param name="changesrevision">5cc7becfe11cb1113af6ac82cd3b11b479d06d58</param> </service> </servicedata> \ No newline at end of file ++++++ crmsh-4.3.1+20210913.d7356663.tar.bz2 -> crmsh-4.3.1+20211012.4e74e9d1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.3.1+20210913.d7356663/.github/workflows/crmsh-ci.yml new/crmsh-4.3.1+20211012.4e74e9d1/.github/workflows/crmsh-ci.yml --- old/crmsh-4.3.1+20210913.d7356663/.github/workflows/crmsh-ci.yml 2021-09-13 06:07:04.000000000 +0200 +++ new/crmsh-4.3.1+20211012.4e74e9d1/.github/workflows/crmsh-ci.yml 2021-10-12 11:05:13.000000000 +0200 @@ -39,7 +39,7 @@ functional_test_hb_report_bugs: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 40 steps: - uses: actions/checkout@v2 - name: functional test for hb_report @@ -49,7 +49,7 @@ functional_test_bootstrap_bugs: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 40 steps: - uses: actions/checkout@v2 - name: functional test for bootstrap bugs @@ -59,7 +59,7 @@ functional_test_bootstrap_common: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 40 steps: - uses: actions/checkout@v2 - name: functional test for bootstrap common @@ -69,7 +69,7 @@ functional_test_bootstrap_options: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 40 steps: - uses: actions/checkout@v2 - name: functional test for bootstrap options @@ -79,7 +79,7 @@ functional_test_qdevice_setup_remove: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 40 steps: - uses: actions/checkout@v2 - name: functional test for qdevice setup and remove @@ -89,7 +89,7 @@ functional_test_qdevice_options: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 40 steps: - uses: actions/checkout@v2 - name: functional test for qdevice options @@ -99,7 +99,7 @@ functional_test_qdevice_validate: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 40 steps: - uses: actions/checkout@v2 - name: functional test for qdevice validate @@ -109,7 +109,7 @@ functional_test_qdevice_user_case: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 40 steps: - uses: actions/checkout@v2 - name: functional test for qdevice user case @@ -119,7 +119,7 @@ functional_test_resource_subcommand: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 40 steps: - uses: actions/checkout@v2 - name: functional test for resource subcommand @@ -129,7 +129,7 @@ functional_test_configure_sublevel: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 40 steps: - uses: actions/checkout@v2 - name: functional test for configure sublevel bugs @@ -139,7 +139,7 @@ functional_test_constraints_bugs: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 40 steps: - uses: actions/checkout@v2 - name: functional test for constraints bugs @@ -149,7 +149,7 @@ functional_test_geo_cluster: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 40 steps: - uses: actions/checkout@v2 - name: functional test for geo cluster @@ -159,7 +159,7 @@ original_regression_test: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 40 steps: - uses: actions/checkout@v2 - name: original regression test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.3.1+20210913.d7356663/crmsh/bootstrap.py new/crmsh-4.3.1+20211012.4e74e9d1/crmsh/bootstrap.py --- old/crmsh-4.3.1+20210913.d7356663/crmsh/bootstrap.py 2021-09-13 06:07:04.000000000 +0200 +++ new/crmsh-4.3.1+20211012.4e74e9d1/crmsh/bootstrap.py 2021-10-12 11:05:13.000000000 +0200 @@ -46,6 +46,8 @@ CSYNC2_KEY = "/etc/csync2/key_hagroup" CSYNC2_CFG = "/etc/csync2/csync2.cfg" COROSYNC_AUTH = "/etc/corosync/authkey" +CRM_CFG = "/etc/crm/crm.conf" +PROFILES_FILE = "/etc/crm/profiles.yml" SYSCONFIG_SBD = "/etc/sysconfig/sbd" SYSCONFIG_PCMK = "/etc/sysconfig/pacemaker" SYSCONFIG_NFS = "/etc/sysconfig/nfs" @@ -63,7 +65,8 @@ BOOTH_AUTH = "/etc/booth/authkey" FILES_TO_SYNC = (BOOTH_DIR, corosync.conf(), COROSYNC_AUTH, CSYNC2_CFG, CSYNC2_KEY, "/etc/ctdb/nodes", "/etc/drbd.conf", "/etc/drbd.d", "/etc/ha.d/ldirectord.cf", "/etc/lvm/lvm.conf", "/etc/multipath.conf", - "/etc/samba/smb.conf", SYSCONFIG_NFS, SYSCONFIG_PCMK, SYSCONFIG_SBD, PCMK_REMOTE_AUTH, WATCHDOG_CFG) + "/etc/samba/smb.conf", SYSCONFIG_NFS, SYSCONFIG_PCMK, SYSCONFIG_SBD, PCMK_REMOTE_AUTH, WATCHDOG_CFG, + PROFILES_FILE, CRM_CFG) INIT_STAGES = ("ssh", "ssh_remote", "csync2", "csync2_remote", "corosync", "sbd", "cluster", "ocfs2", "admin", "qdevice") @@ -78,7 +81,6 @@ Context object used to avoid having to pass these variables to every bootstrap method. """ - PROFILES_FILE = "/etc/crm/profiles.yml" DEFAULT_PROFILE_NAME = "default" S390_PROFILE_NAME = "s390" @@ -225,10 +227,10 @@ return profile_dict if profile_type in self.profiles_data: - logger.info("Loading \"{}\" profile from {}".format(profile_type, self.PROFILES_FILE)) + logger.info("Loading \"{}\" profile from {}".format(profile_type, PROFILES_FILE)) profile_dict = self.profiles_data[profile_type] else: - logger.info("\"{}\" profile does not exist in {}".format(profile_type, self.PROFILES_FILE)) + logger.info("\"{}\" profile does not exist in {}".format(profile_type, PROFILES_FILE)) return profile_dict def load_profiles(self): @@ -237,9 +239,9 @@ """ profile_type = self.detect_platform() - if not os.path.exists(self.PROFILES_FILE): + if not os.path.exists(PROFILES_FILE): return - with open(self.PROFILES_FILE) as f: + with open(PROFILES_FILE) as f: self.profiles_data = yaml.load(f, Loader=yaml.SafeLoader) # empty file if not self.profiles_data: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.3.1+20210913.d7356663/crmsh/ui_resource.py new/crmsh-4.3.1+20211012.4e74e9d1/crmsh/ui_resource.py --- old/crmsh-4.3.1+20210913.d7356663/crmsh/ui_resource.py 2021-09-13 06:07:04.000000000 +0200 +++ new/crmsh-4.3.1+20211012.4e74e9d1/crmsh/ui_resource.py 2021-10-12 11:05:13.000000000 +0200 @@ -378,27 +378,30 @@ "usage: unmanage <rsc>" return self._commit_meta_attr(context, rsc, "is-managed", "false") - @command.alias('migrate') - @command.skill_level('administrator') - @command.wait - @command.completers_repeating(compl.resources, compl.nodes, - compl.choice(['reboot', 'forever', 'force'])) - def do_move(self, context, rsc, *args): - """usage: move <rsc> [<node>] [<lifetime>] [force]""" + def move_or_ban(self, context, rsc, *args): + """ + Common codes for move or ban action + """ if not utils.is_name_sane(rsc): return False + cmd_map_dict = {'move': self.rsc_migrate, + 'ban': self.rsc_ban} + action = context.get_command_name() + action_cap = action.capitalize() + action_cmd = cmd_map_dict[action] node = None + lifetime = None argl = list(args) force = "force" in utils.fetch_opts(argl, ["force"]) or config.core.force - lifetime = utils.fetch_lifetime_opt(argl) if len(argl) > 0: node = argl[0] if not xmlutil.is_our_node(node): context.fatal_error("Not our node: " + node) + if len(argl) == 2: + lifetime = utils.fetch_lifetime_opt(argl[1]) - if context.get_command_name() == 'move': - if not node and not force: - context.fatal_error("No target node: Move requires either a target node or 'force'") + if action == "move" and not node and not force: + context.fatal_error("No target node: {} requires either a target node or 'force'".format(action_cap)) opts = '' if node: @@ -407,43 +410,31 @@ opts = "%s --lifetime '%s'" % (opts, lifetime) if force or config.core.force: opts = "%s --force" % opts - rc = utils.ext_cmd(self.rsc_migrate % (rsc, opts)) + rc = utils.ext_cmd(action_cmd % (rsc, opts)) if rc == 0: if node: - logger.info("Move constraint created for %s to %s", rsc, node) + logger.info("%s constraint created for %s to %s", action_cap, rsc, node) else: - logger.info("Move constraint created for %s", rsc) + logger.info("%s constraint created for %s", action_cap, rsc) + logger.info("Use `crm resource clear %s` to remove this constraint", rsc) return rc == 0 + @command.alias('migrate') + @command.skill_level('administrator') + @command.wait + @command.completers_repeating(compl.resources, compl.nodes, + compl.choice(['reboot', 'forever', 'force'])) + def do_move(self, context, rsc, *args): + """usage: move <rsc> [<node>] [<lifetime>] [force]""" + return self.move_or_ban(context, rsc, *args) + + @command.skill_level('administrator') @command.wait @command.completers_repeating(compl.resources, compl.nodes) def do_ban(self, context, rsc, *args): """usage: ban <rsc> [<node>] [<lifetime>] [force]""" - if not utils.is_name_sane(rsc): - return False - node = None - argl = list(args) - force = "force" in utils.fetch_opts(argl, ["force"]) or config.core.force - lifetime = utils.fetch_lifetime_opt(argl) - if len(argl) > 0: - node = argl[0] - if not xmlutil.is_our_node(node): - context.fatal_error("Not our node: " + node) - opts = '' - if node: - opts = "--node '%s'" % node - if lifetime: - opts = "%s --lifetime '%s'" % (opts, lifetime) - if force: - opts = "%s --force" % opts - rc = utils.ext_cmd(self.rsc_ban % (rsc, opts)) - if rc == 0: - if node: - logger.info("Ban constraint created for %s on %s", rsc, node) - else: - logger.info("Ban constraint created for %s", rsc) - return rc == 0 + return self.move_or_ban(context, rsc, *args) @command.alias('unmove', 'unban', 'unmigrate') @command.skill_level('administrator') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.3.1+20210913.d7356663/test/docker_scripts.sh new/crmsh-4.3.1+20211012.4e74e9d1/test/docker_scripts.sh --- old/crmsh-4.3.1+20210913.d7356663/test/docker_scripts.sh 2021-09-13 06:07:04.000000000 +0200 +++ new/crmsh-4.3.1+20211012.4e74e9d1/test/docker_scripts.sh 2021-10-12 11:05:13.000000000 +0200 @@ -1,5 +1,5 @@ #!/bin/bash -Docker_image='liangxin1300/hatbw' +Docker_image='liangxin1300/haleap:15.2' HA_packages='pacemaker corosync corosync-qdevice' TEST_TYPE='bootstrap qdevice hb_report geo' @@ -22,6 +22,8 @@ docker network connect second_net $node_name docker network connect third_net $node_name docker exec -t $node_name /bin/sh -c "echo \"$etc_hosts_content\" | grep -v $node_name >> /etc/hosts" + # https://unix.stackexchange.com/questions/335189/system-refuses-ssh-and-stuck-on-booting-up-after-systemd-installation + #docker exec -t $node_name /bin/sh -c "systemctl start sshd.service; systemctl start systemd-user-sessions.service" if [ "$node_name" == "qnetd-node" ];then docker exec -t $node_name /bin/sh -c "zypper ref;zypper -n in corosync-qnetd" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.3.1+20210913.d7356663/test/testcases/resource.exp new/crmsh-4.3.1+20211012.4e74e9d1/test/testcases/resource.exp --- old/crmsh-4.3.1+20210913.d7356663/test/testcases/resource.exp 2021-09-13 06:07:04.000000000 +0200 +++ new/crmsh-4.3.1+20211012.4e74e9d1/test/testcases/resource.exp 2021-10-12 11:05:13.000000000 +0200 @@ -146,6 +146,7 @@ INFO: "migrate" is accepted as "move" .EXT crm_resource --quiet --move --resource 'p3' --node 'node1' INFO: Move constraint created for p3 to node1 +INFO: Use `crm resource clear p3` to remove this constraint .INP: configure .INP: _regtest on .INP: show xml cli-prefer-p3 @@ -173,6 +174,7 @@ INFO: "migrate" is accepted as "move" .EXT crm_resource --quiet --move --resource 'p3' --node 'node1' --force INFO: Move constraint created for p3 to node1 +INFO: Use `crm resource clear p3` to remove this constraint .INP: configure .INP: _regtest on .INP: show xml cli-prefer-p3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.3.1+20210913.d7356663/test/unittests/test_bootstrap.py new/crmsh-4.3.1+20211012.4e74e9d1/test/unittests/test_bootstrap.py --- old/crmsh-4.3.1+20210913.d7356663/test/unittests/test_bootstrap.py 2021-09-13 06:07:04.000000000 +0200 +++ new/crmsh-4.3.1+20211012.4e74e9d1/test/unittests/test_bootstrap.py 2021-10-12 11:05:13.000000000 +0200 @@ -151,14 +151,14 @@ self.ctx_inst.profiles_data = {"name": "test"} res = self.ctx_inst.load_specific_profile("newname") assert res == {} - mock_status.assert_called_once_with("\"newname\" profile does not exist in {}".format(bootstrap.Context.PROFILES_FILE)) + mock_status.assert_called_once_with("\"newname\" profile does not exist in {}".format(bootstrap.PROFILES_FILE)) @mock.patch('logging.Logger.info') def test_load_specific_profile(self, mock_status): self.ctx_inst.profiles_data = {"name": "test"} res = self.ctx_inst.load_specific_profile("name") assert res == "test" - mock_status.assert_called_once_with("Loading \"name\" profile from {}".format(bootstrap.Context.PROFILES_FILE)) + mock_status.assert_called_once_with("Loading \"name\" profile from {}".format(bootstrap.PROFILES_FILE)) @mock.patch('logging.Logger.info') @mock.patch('crmsh.utils.detect_cloud') @@ -190,7 +190,7 @@ mock_exists.return_value = False self.ctx_inst.load_profiles() mock_platform.assert_called_once_with() - mock_exists.assert_called_once_with(bootstrap.Context.PROFILES_FILE) + mock_exists.assert_called_once_with(bootstrap.PROFILES_FILE) @mock.patch('yaml.load') @mock.patch('builtins.open', new_callable=mock.mock_open, read_data="") @@ -202,8 +202,8 @@ mock_load.return_value = "" self.ctx_inst.load_profiles() mock_platform.assert_called_once_with() - mock_exists.assert_called_once_with(bootstrap.Context.PROFILES_FILE) - mock_open_file.assert_called_once_with(bootstrap.Context.PROFILES_FILE) + mock_exists.assert_called_once_with(bootstrap.PROFILES_FILE) + mock_open_file.assert_called_once_with(bootstrap.PROFILES_FILE) mock_load.assert_called_once_with(mock_open_file.return_value, Loader=yaml.SafeLoader) @mock.patch('crmsh.bootstrap.Context.load_specific_profile') @@ -224,8 +224,8 @@ assert self.ctx_inst.profiles_dict == {"name": "wang", "age": 18} mock_platform.assert_called_once_with() - mock_exists.assert_called_once_with(bootstrap.Context.PROFILES_FILE) - mock_open_file.assert_called_once_with(bootstrap.Context.PROFILES_FILE) + mock_exists.assert_called_once_with(bootstrap.PROFILES_FILE) + mock_open_file.assert_called_once_with(bootstrap.PROFILES_FILE) mock_load.assert_called_once_with(mock_open_file.return_value, Loader=yaml.SafeLoader) mock_load_specific.assert_has_calls([ mock.call(bootstrap.Context.DEFAULT_PROFILE_NAME),