Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2023-04-24 22:31:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crmsh (Old) and /work/SRC/openSUSE:Factory/.crmsh.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh" Mon Apr 24 22:31:45 2023 rev:292 rq:1082477 version:4.5.0+20230424.75600b3f Changes: -------- --- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2023-04-21 14:17:52.330870211 +0200 +++ /work/SRC/openSUSE:Factory/.crmsh.new.1533/crmsh.changes 2023-04-24 22:31:53.791754332 +0200 @@ -1,0 +2,9 @@ +Mon Apr 24 09:12:24 UTC 2023 - xli...@suse.com + +- Update to version 4.5.0+20230424.75600b3f: + * Fix: help: Long time to load and parse crm.8.adoc (bsc#1210198) + * Dev: behave: Adjust functional test for previous change + * Dev: unittest: Adjust unit test for previous change + * Fix: lock: Join node failed to wait init node finished (bsc#1210332) + +------------------------------------------------------------------- Old: ---- crmsh-4.5.0+20230421.a509b8ce.tar.bz2 New: ---- crmsh-4.5.0+20230424.75600b3f.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.spec ++++++ --- /var/tmp/diff_new_pack.5RtQtU/_old 2023-04-24 22:31:54.395757922 +0200 +++ /var/tmp/diff_new_pack.5RtQtU/_new 2023-04-24 22:31:54.399757946 +0200 @@ -36,7 +36,7 @@ Summary: High Availability cluster command-line interface License: GPL-2.0-or-later Group: %{pkg_group} -Version: 4.5.0+20230421.a509b8ce +Version: 4.5.0+20230424.75600b3f Release: 0 URL: http://crmsh.github.io Source0: %{name}-%{version}.tar.bz2 ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.5RtQtU/_old 2023-04-24 22:31:54.467758350 +0200 +++ /var/tmp/diff_new_pack.5RtQtU/_new 2023-04-24 22:31:54.471758374 +0200 @@ -9,7 +9,7 @@ </service> <service name="tar_scm"> <param name="url">https://github.com/ClusterLabs/crmsh.git</param> - <param name="changesrevision">a509b8ce039b4f6c6070f9be5545dd04dbf979f2</param> + <param name="changesrevision">75600b3f641bdcc21b2252080700e71d17e1d03a</param> </service> </servicedata> (No newline at EOF) ++++++ crmsh-4.5.0+20230421.a509b8ce.tar.bz2 -> crmsh-4.5.0+20230424.75600b3f.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.5.0+20230421.a509b8ce/crmsh/bootstrap.py new/crmsh-4.5.0+20230424.75600b3f/crmsh/bootstrap.py --- old/crmsh-4.5.0+20230421.a509b8ce/crmsh/bootstrap.py 2023-04-21 10:23:56.000000000 +0200 +++ new/crmsh-4.5.0+20230424.75600b3f/crmsh/bootstrap.py 2023-04-24 10:59:23.000000000 +0200 @@ -2393,7 +2393,7 @@ init_sbd() init_upgradeutil() - lock_inst = lock.Lock(mktemp(prefix="crmsh_lock_")) + lock_inst = lock.Lock() try: with lock_inst.lock(): init_cluster() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.5.0+20230421.a509b8ce/crmsh/help.py new/crmsh-4.5.0+20230424.75600b3f/crmsh/help.py --- old/crmsh-4.5.0+20230421.a509b8ce/crmsh/help.py 2023-04-21 10:23:56.000000000 +0200 +++ new/crmsh-4.5.0+20230424.75600b3f/crmsh/help.py 2023-04-24 10:59:23.000000000 +0200 @@ -79,6 +79,9 @@ self.long = long_help self.alias_for = alias_for self.generated = generated + self.from_cli = False + self.level = False + self.name = False def is_alias(self): return self.alias_for is not None @@ -91,6 +94,10 @@ helpfilter = HelpFilter() short_help = clidisplay.help_header(self.short) + if self.from_cli and self.level and self.name: + _, output, _ = get_stdout_stderr(f"crm {self.level} {self.name} --help-without-redirect") + page_string(short_help + '\n\n'+ output) + return long_help = self.long if long_help: @@ -107,6 +114,11 @@ def set_long_help(self, long_help): self.long = long_help + def set_long_lazy_load_source(self, level, name, from_cli): + self.level = level + self.name = name + self.from_cli = from_cli + def __str__(self): if self.long: return self.short + '\n' + self.long @@ -347,10 +359,7 @@ lvl = entry['level'] if lvl not in _COMMANDS: _COMMANDS[lvl] = odict() - if entry['from_cli']: - _, help_output, _ = get_stdout_stderr("crm {} {} --help-without-redirect".format(lvl, name)) - if help_output: - helpobj.set_long_help(help_output.rstrip()) + helpobj.set_long_lazy_load_source(entry['level'], entry['name'], entry['from_cli']) _COMMANDS[lvl][name] = helpobj def filter_line(line): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.5.0+20230421.a509b8ce/crmsh/lock.py new/crmsh-4.5.0+20230424.75600b3f/crmsh/lock.py --- old/crmsh-4.5.0+20230421.a509b8ce/crmsh/lock.py 2023-04-21 10:23:56.000000000 +0200 +++ new/crmsh-4.5.0+20230424.75600b3f/crmsh/lock.py 2023-04-24 10:59:23.000000000 +0200 @@ -31,7 +31,7 @@ A base class define a lock mechanism used to exclude other nodes """ - LOCK_DIR_NON_PRIVILEGED = "/tmp/.crmsh_lock_directory" + LOCK_DIR_DEFAULT = "/run/.crmsh_lock_directory" def __init__(self, lock_dir=None): """ @@ -39,7 +39,7 @@ """ # only the lock owner can unlock self.lock_owner = False - self.lock_dir = lock_dir or self.LOCK_DIR_NON_PRIVILEGED + self.lock_dir = lock_dir or self.LOCK_DIR_DEFAULT def _run(self, cmd): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.5.0+20230421.a509b8ce/crmsh/ui_cluster.py new/crmsh-4.5.0+20230424.75600b3f/crmsh/ui_cluster.py --- old/crmsh-4.5.0+20230421.a509b8ce/crmsh/ui_cluster.py 2023-04-21 10:23:56.000000000 +0200 +++ new/crmsh-4.5.0+20230424.75600b3f/crmsh/ui_cluster.py 2023-04-24 10:59:23.000000000 +0200 @@ -265,7 +265,7 @@ # Setup the cluster on the current node, with SBD+OCFS2 crm cluster init -s <share disk1> -o <share disk2> -y - # Setup the cluster on the current node, with SBD++OCFS2++Cluster LVM + # Setup the cluster on the current node, with SBD+OCFS2+Cluster LVM crm cluster init -s <share disk1> -o <share disk2> -o <share disk3> -C -y # Add SBD on a running cluster diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.5.0+20230421.a509b8ce/test/features/bootstrap_bugs.feature new/crmsh-4.5.0+20230424.75600b3f/test/features/bootstrap_bugs.feature --- old/crmsh-4.5.0+20230421.a509b8ce/test/features/bootstrap_bugs.feature 2023-04-21 10:23:56.000000000 +0200 +++ new/crmsh-4.5.0+20230424.75600b3f/test/features/bootstrap_bugs.feature 2023-04-24 10:59:23.000000000 +0200 @@ -98,10 +98,10 @@ Then Cluster service is "started" on "hanode2" # Try to simulate the join process hanging on hanode2 or hanode2 died # Just leave the lock directory unremoved - When Run "mkdir /tmp/.crmsh_lock_directory" on "hanode1" + When Run "mkdir /run/.crmsh_lock_directory" on "hanode1" When Try "crm cluster join -c hanode1 -y" on "hanode3" - Then Except "ERROR: cluster.join: Timed out after 120 seconds. Cannot continue since the lock directory exists at the node (hanode1:/tmp/.crmsh_lock_directory)" - When Run "rm -rf /tmp/.crmsh_lock_directory" on "hanode1" + Then Except "ERROR: cluster.join: Timed out after 120 seconds. Cannot continue since the lock directory exists at the node (hanode1:/run/.crmsh_lock_directory)" + When Run "rm -rf /run/.crmsh_lock_directory" on "hanode1" @clean Scenario: Change host name in /etc/hosts as alias(bsc#1183654) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.5.0+20230421.a509b8ce/test/unittests/test_lock.py new/crmsh-4.5.0+20230424.75600b3f/test/unittests/test_lock.py --- old/crmsh-4.5.0+20230421.a509b8ce/test/unittests/test_lock.py 2023-04-21 10:23:56.000000000 +0200 +++ new/crmsh-4.5.0+20230424.75600b3f/test/unittests/test_lock.py 2023-04-24 10:59:23.000000000 +0200 @@ -59,28 +59,28 @@ mock_run.return_value = (1, None, None) rc = self.local_inst._create_lock_dir() self.assertEqual(rc, False) - mock_run.assert_called_once_with("mkdir {}".format(lock.Lock.LOCK_DIR_NON_PRIVILEGED)) + mock_run.assert_called_once_with("mkdir {}".format(lock.Lock.LOCK_DIR_DEFAULT)) @mock.patch('crmsh.lock.Lock._run') def test_create_lock_dir(self, mock_run): mock_run.return_value = (0, None, None) rc = self.local_inst._create_lock_dir() self.assertEqual(rc, True) - mock_run.assert_called_once_with("mkdir {}".format(lock.Lock.LOCK_DIR_NON_PRIVILEGED)) + mock_run.assert_called_once_with("mkdir {}".format(lock.Lock.LOCK_DIR_DEFAULT)) @mock.patch('crmsh.lock.Lock._create_lock_dir') def test_lock_or_fail(self, mock_create): mock_create.return_value = False with self.assertRaises(lock.ClaimLockError) as err: self.local_inst._lock_or_fail() - self.assertEqual("Failed to claim lock (the lock directory exists at {})".format(lock.Lock.LOCK_DIR_NON_PRIVILEGED), str(err.exception)) + self.assertEqual("Failed to claim lock (the lock directory exists at {})".format(lock.Lock.LOCK_DIR_DEFAULT), str(err.exception)) mock_create.assert_called_once_with() @mock.patch('crmsh.lock.Lock._run') def test_unlock(self, mock_run): self.local_inst.lock_owner = True self.local_inst._unlock() - mock_run.assert_called_once_with("rm -rf {}".format(lock.Lock.LOCK_DIR_NON_PRIVILEGED)) + mock_run.assert_called_once_with("rm -rf {}".format(lock.Lock.LOCK_DIR_DEFAULT)) @mock.patch('crmsh.lock.Lock._unlock') @mock.patch('crmsh.lock.Lock._lock_or_fail') @@ -211,7 +211,7 @@ with self.assertRaises(lock.ClaimLockError) as err: self.lock_inst._lock_or_wait() - self.assertEqual("Timed out after 120 seconds. Cannot continue since the lock directory exists at the node (node1:{})".format(lock.Lock.LOCK_DIR_NON_PRIVILEGED), str(err.exception)) + self.assertEqual("Timed out after 120 seconds. Cannot continue since the lock directory exists at the node (node1:{})".format(lock.Lock.LOCK_DIR_DEFAULT), str(err.exception)) mock_time.assert_has_calls([ mock.call(), mock.call()]) mock_time_out.assert_has_calls([mock.call(), mock.call(), mock.call()])