Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2025-06-17 18:22:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crmsh (Old) and /work/SRC/openSUSE:Factory/.crmsh.new.19631 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh" Tue Jun 17 18:22:38 2025 rev:374 rq:1286218 version:5.0.0+20250613.d8108049 Changes: -------- --- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2025-06-10 09:09:28.413822832 +0200 +++ /work/SRC/openSUSE:Factory/.crmsh.new.19631/crmsh.changes 2025-06-17 18:23:25.669314631 +0200 @@ -1,0 +2,14 @@ +Fri Jun 13 10:49:45 UTC 2025 - xli...@suse.com + +- Update to version 5.0.0+20250613.d8108049: + * Fix: bootstrap: setup_passwordless_with_other_nodes does not update the authorized_keys on localhost (bsc#1244314) + +------------------------------------------------------------------- +Fri Jun 13 05:19:33 UTC 2025 - xli...@suse.com + +- Update to version 5.0.0+20250613.597abc68: + * Dev: unittests: Adjust unit test for previous commit + * Dev: behave: Add functional test for previous commit + * Fix: report.collect: Detect log existence before using it (bsc#1244515) + +------------------------------------------------------------------- Old: ---- crmsh-5.0.0+20250609.4f272e67.tar.bz2 New: ---- crmsh-5.0.0+20250613.d8108049.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.spec ++++++ --- /var/tmp/diff_new_pack.0wvUQE/_old 2025-06-17 18:23:26.533350560 +0200 +++ /var/tmp/diff_new_pack.0wvUQE/_new 2025-06-17 18:23:26.533350560 +0200 @@ -41,7 +41,7 @@ Summary: High Availability cluster command-line interface License: GPL-2.0-or-later Group: %{pkg_group} -Version: 5.0.0+20250609.4f272e67 +Version: 5.0.0+20250613.d8108049 Release: 0 URL: http://crmsh.github.io Source0: %{name}-%{version}.tar.bz2 ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.0wvUQE/_old 2025-06-17 18:23:26.585352722 +0200 +++ /var/tmp/diff_new_pack.0wvUQE/_new 2025-06-17 18:23:26.589352888 +0200 @@ -9,7 +9,7 @@ </service> <service name="tar_scm"> <param name="url">https://github.com/ClusterLabs/crmsh.git</param> - <param name="changesrevision">4f272e673ca77aedf2a7f8cbf8693f9585339af9</param> + <param name="changesrevision">dde7f136d702c65fcc1df073e774ed8ecf61e0ea</param> </service> </servicedata> (No newline at EOF) ++++++ crmsh-5.0.0+20250609.4f272e67.tar.bz2 -> crmsh-5.0.0+20250613.d8108049.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.0.0+20250609.4f272e67/crmsh/bootstrap.py new/crmsh-5.0.0+20250613.d8108049/crmsh/bootstrap.py --- old/crmsh-5.0.0+20250609.4f272e67/crmsh/bootstrap.py 2025-06-09 07:54:44.000000000 +0200 +++ new/crmsh-5.0.0+20250613.d8108049/crmsh/bootstrap.py 2025-06-13 12:16:55.000000000 +0200 @@ -1900,7 +1900,12 @@ result = ssh_copy_id_no_raise(local_user, remote_privileged_user, node, local_shell) if result.returncode != 0: utils.fatal("Failed to login to remote host {}@{}".format(remote_user_to_swap, node)) - _merge_ssh_authorized_keys(cluster_node_list) + if utils.this_node() in cluster_node_list: + nodes_including_self = cluster_node_list + else: + nodes_including_self = [utils.this_node()] + nodes_including_self.extend(cluster_node_list) + _merge_ssh_authorized_keys(shell, user_of_host.UserOfHost.instance(), nodes_including_self) if local_user != 'hacluster': change_user_shell('hacluster', node) swap_public_ssh_key(node, 'hacluster', 'hacluster', local_user, remote_privileged_user, local_shell) @@ -1910,7 +1915,7 @@ user_by_host.save_remote(cluster_node_list) -def _merge_ssh_authorized_keys(nodes: typing.Sequence[str]): +def _merge_ssh_authorized_keys(shell: sh.ClusterShell, user_of_host: user_of_host.UserOfHost, nodes: typing.Sequence[str]): keys = set() with tempfile.TemporaryDirectory(prefix='crmsh-bootstrap-') as tmpdir: # sftp does not accept `~` @@ -1919,7 +1924,11 @@ for line in f: if line.startswith('ssh-'): keys.add(line.rstrip()) - parallax.parallax_run(nodes, _merge_line_into_file('~/.ssh/authorized_keys', keys)) + script = _merge_line_into_file('~/.ssh/authorized_keys', keys) + for node in nodes: + rc, error = shell.get_rc_and_error(node, user_of_host.user_of(node), script) + if rc != 0: + raise ValueError(error) def swap_key_for_hacluster(other_node_list): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.0.0+20250609.4f272e67/crmsh/report/collect.py new/crmsh-5.0.0+20250613.d8108049/crmsh/report/collect.py --- old/crmsh-5.0.0+20250609.4f272e67/crmsh/report/collect.py 2025-06-09 07:54:44.000000000 +0200 +++ new/crmsh-5.0.0+20250613.d8108049/crmsh/report/collect.py 2025-06-13 12:16:55.000000000 +0200 @@ -10,7 +10,7 @@ import pwd import datetime from subprocess import TimeoutExpired -from typing import List +from typing import List, Optional import crmsh.user_of_host from crmsh import log, sh, corosync @@ -23,11 +23,11 @@ logger = log.setup_report_logger(__name__) -def get_corosync_log() -> str: +def get_corosync_log() -> Optional[str]: """ Get the path of the corosync log file """ - corosync_log = "" + corosync_log = None corosync_conf_path = corosync.conf() if os.path.exists(corosync_conf_path): corosync_log = corosync.get_value("logging.logfile") @@ -36,7 +36,7 @@ return corosync_log -def get_pcmk_log() -> str: +def get_pcmk_log() -> Optional[str]: """ Get the path of the pacemaker log file """ @@ -57,7 +57,7 @@ return log logger.warning("No valid pacemaker log file found") - return "" + return None def collect_ha_logs(context: core.Context) -> None: @@ -65,10 +65,10 @@ Collect pacemaker, corosync and extra logs """ log_list = [get_pcmk_log(), get_corosync_log()] + context.extra_log_list - log_list = [os.path.expanduser(log) for log in log_list] + log_list = [os.path.expanduser(log) for log in log_list if log is not None] log_list_marked_same_basename = utils.mark_duplicate_basenames(log_list) for log, same_basename in log_list_marked_same_basename: - if log and os.path.isfile(log): + if os.path.isfile(log): utils.dump_logset(context, log, create_dir=same_basename) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.0.0+20250609.4f272e67/test/features/crm_report_bugs.feature new/crmsh-5.0.0+20250613.d8108049/test/features/crm_report_bugs.feature --- old/crmsh-5.0.0+20250609.4f272e67/test/features/crm_report_bugs.feature 2025-06-09 07:54:44.000000000 +0200 +++ new/crmsh-5.0.0+20250613.d8108049/test/features/crm_report_bugs.feature 2025-06-13 12:16:55.000000000 +0200 @@ -171,3 +171,11 @@ # found password Then Expected return code is "0" When Run "rm -rf report.tar.bz2 report" on "hanode1" + + @clean + Scenario: When no logfile in corosync.conf (bsc#1244515, bsc#1232821) + When Run "sed -i '/logfile:/d' /etc/corosync/corosync.conf" on "hanode1" + When Run "sed -i '/logfile:/d' /etc/corosync/corosync.conf" on "hanode2" + When Try "crm report report" on "hanode1" + # Should no exception here + Then Expected "TypeError:" not in stderr diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.0.0+20250609.4f272e67/test/features/crm_report_normal.feature new/crmsh-5.0.0+20250613.d8108049/test/features/crm_report_normal.feature --- old/crmsh-5.0.0+20250609.4f272e67/test/features/crm_report_normal.feature 2025-06-09 07:54:44.000000000 +0200 +++ new/crmsh-5.0.0+20250613.d8108049/test/features/crm_report_normal.feature 2025-06-13 12:16:55.000000000 +0200 @@ -87,6 +87,10 @@ When Run "crm report -d /tmp/report" on "hanode1" Then Directory "/tmp/report" created + Then Directory "/tmp/report/hanode1/crm.conf.d/root/.config/crm" created + Then Directory "/tmp/report/hanode1/crm.conf.d/etc/crm" created + Then Directory "/tmp/report/hanode2/crm.conf.d/root/.config/crm" created + Then Directory "/tmp/report/hanode2/crm.conf.d/etc/crm" created When Try "crm report -d /tmp/report" on "hanode1" Then Expected "Destination directory /tmp/report exists, please cleanup or use -Z option" in stderr When Run "crm report -d -Z /tmp/report" on "hanode1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.0.0+20250609.4f272e67/test/unittests/test_bootstrap.py new/crmsh-5.0.0+20250613.d8108049/test/unittests/test_bootstrap.py --- old/crmsh-5.0.0+20250609.4f272e67/test/unittests/test_bootstrap.py 2025-06-09 07:54:44.000000000 +0200 +++ new/crmsh-5.0.0+20250613.d8108049/test/unittests/test_bootstrap.py 2025-06-13 12:16:55.000000000 +0200 @@ -952,7 +952,7 @@ ]) mock_host_user_config.return_value.save_local.assert_called_once_with() mock_ssh_copy_id.assert_called_once_with('carol', 'foo', 'node2', mock_local_shell.return_value) - mock_merge_ssh_authorized_keys.assert_called_once_with(['node1', 'node2']) + mock_merge_ssh_authorized_keys.assert_called_once_with(mock_cluster_shell.return_value, mock_user_of_host.instance.return_value, ['node3', 'node1', 'node2']) mock_change_user_shell.assert_called_once_with('hacluster', 'node2') mock_swap_public_ssh_key.assert_called_once_with('node2', 'hacluster', 'hacluster', 'carol', 'foo', mock_local_shell.return_value) mock_swap_key_for_hacluster.assert_called_once_with(['node1', 'node2']) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.0.0+20250609.4f272e67/test/unittests/test_report_collect.py new/crmsh-5.0.0+20250613.d8108049/test/unittests/test_report_collect.py --- old/crmsh-5.0.0+20250609.4f272e67/test/unittests/test_report_collect.py 2025-06-09 07:54:44.000000000 +0200 +++ new/crmsh-5.0.0+20250613.d8108049/test/unittests/test_report_collect.py 2025-06-13 12:16:55.000000000 +0200 @@ -13,7 +13,7 @@ def test_get_pcmk_log_no_config(self, mock_isfile, mock_warning): mock_isfile.side_effect = [False, False, False] res = collect.get_pcmk_log() - self.assertEqual(res, "") + self.assertIsNone(res) mock_isfile.assert_has_calls([ mock.call(constants.PCMKCONF), mock.call("/var/log/pacemaker/pacemaker.log"), @@ -74,7 +74,7 @@ def test_get_corosync_log_not_exist(self, mock_conf, mock_exists, mock_warning): mock_conf.return_value = "/etc/corosync/corosync.conf" mock_exists.return_value = False - self.assertEqual(collect.get_corosync_log(), "") + self.assertIsNone(collect.get_corosync_log()) @mock.patch('crmsh.corosync.get_value') @mock.patch('os.path.exists')