Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2026-11-19 16:57:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crmsh (Old) and /work/SRC/openSUSE:Factory/.crmsh.new.1251 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh" Thu Nov 19 16:57:10 2026 rev:427 rq:1398653 version:5.1.0+20261119.3c9d86d6 Changes: -------- --- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2026-11-17 17:23:42.896019910 +0100 +++ /work/SRC/openSUSE:Factory/.crmsh.new.1251/crmsh.changes 2026-11-19 16:58:40.472835866 +0100 @@ -1,0 +2,19 @@ +Thu Nov 19 09:56:43 UTC 2026 - [email protected] + +- Update to version 5.1.0+20261119.3c9d86d6: + * fix(sbd): drop timeout_io from the disk-based watchdog timeout formulas + * build(doc): migrate documentation build to Meson (#2194) + +------------------------------------------------------------------- +Wed Nov 18 10:37:50 UTC 2026 - [email protected] + +- Update to version 5.1.0+20261118.955f1167: + * fix(completers): avoid repeated completions (#2115) + +------------------------------------------------------------------- +Wed Nov 18 07:29:37 UTC 2026 - [email protected] + +- Update to version 5.1.0+20261118.a8166500: + * fix(completion): show option help in non-interactive mode + +------------------------------------------------------------------- Old: ---- crmsh-5.1.0+20261117.fd431ad0.tar.bz2 New: ---- crmsh-5.1.0+20261119.3c9d86d6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.spec ++++++ --- /var/tmp/diff_new_pack.m8m2Ot/_old 2026-11-19 16:58:42.386917000 +0100 +++ /var/tmp/diff_new_pack.m8m2Ot/_new 2026-11-19 16:58:42.391917212 +0100 @@ -40,7 +40,7 @@ Summary: High Availability cluster command-line interface License: GPL-2.0-or-later Group: %{pkg_group} -Version: 5.1.0+20261117.fd431ad0 +Version: 5.1.0+20261119.3c9d86d6 Release: 0 URL: http://crmsh.github.io Source0: %{name}-%{version}.tar.bz2 ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.m8m2Ot/_old 2026-11-19 16:58:42.497921706 +0100 +++ /var/tmp/diff_new_pack.m8m2Ot/_new 2026-11-19 16:58:42.508922172 +0100 @@ -9,7 +9,7 @@ </service> <service name="tar_scm"> <param name="url">https://github.com/ClusterLabs/crmsh.git</param> - <param name="changesrevision">fd431ad07bb96f753795ee20025ca272808d7289</param> + <param name="changesrevision">3c9d86d60e4f92c021178b9a8c645cfba39052cc</param> </service> </servicedata> (No newline at EOF) ++++++ crmsh-5.1.0+20261117.fd431ad0.tar.bz2 -> crmsh-5.1.0+20261119.3c9d86d6.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/contrib/bash_completion.sh new/crmsh-5.1.0+20261119.3c9d86d6/contrib/bash_completion.sh --- old/crmsh-5.1.0+20261117.fd431ad0/contrib/bash_completion.sh 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/contrib/bash_completion.sh 2026-11-19 10:35:40.000000000 +0100 @@ -221,7 +221,21 @@ ;; esac - __crmcomp_nl "$(2>/dev/null crm --compgen "${COMP_POINT}" "${COMP_LINE}")" "$pfx" "$cur_" + local line out="" help="" + while IFS= read -r line; do + if [[ "$line" == "#help# "* ]]; then + help+="${line#\#help\# }"$'\n' + else + out+="$line"$'\n' + fi + done < <(2>/dev/null crm --compgen "${COMP_POINT}" "${COMP_LINE}") + + __crmcomp_nl "$out" "$pfx" "$cur_" + + # nothing to complete: show the help text and redraw the prompt + if [ ${#COMPREPLY[@]} -eq 0 ] && [ -n "$help" ]; then + printf '\n%s\n%s%s' "${help%$'\n'}" "${PS1@P}" "$COMP_LINE" >&2 + fi } _crm() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/crmsh/completers.py new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/completers.py --- old/crmsh-5.1.0+20261117.fd431ad0/crmsh/completers.py 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/completers.py 2026-11-19 10:35:40.000000000 +0100 @@ -41,6 +41,13 @@ return completer +def exclude_completed(fn, start_index=1): + def completer(args): + completed = set(args[start_index:-1]) + return [item for item in fn(args) if item not in completed] + return completer + + booleans = choice(['yes', 'no', 'true', 'false', 'on', 'off']) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/crmsh/constants.py new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/constants.py --- old/crmsh-5.1.0+20261117.fd431ad0/crmsh/constants.py 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/constants.py 2026-11-19 10:35:40.000000000 +0100 @@ -246,6 +246,8 @@ need_reset = False prompt = '' +# marks help lines in the output of "crm --compgen", see contrib/bash_completion.sh +COMPGEN_HELP_PREFIX = "#help# " tmp_cib = False tmp_cib_prompt = "@tmp@" live_cib_prompt = "live" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/crmsh/sbd.py new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/sbd.py --- old/crmsh-5.1.0+20261117.fd431ad0/crmsh/sbd.py 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/sbd.py 2026-11-19 10:35:40.000000000 +0100 @@ -250,8 +250,6 @@ SBD_WATCHDOG_TIMEOUT_DEFAULT_S390 = 15 SBD_WATCHDOG_TIMEOUT_DEFAULT_WITH_QDEVICE = 35 SBD_SERVANT_RESTART_INTERVAL_DEFAULT = 5 - SBD_LOOP_TIMEOUT_DEFAULT = 1 - SBD_TIMEOUT_IO_LOOP_TIMEOUT_FACTOR = 3 QDEVICE_SYNC_TIMEOUT_MARGIN = 5 SHOW_SBD_START_TIMEOUT_CMD = "systemctl daemon-reload; systemctl show -p TimeoutStartUSec sbd.service --value" SHOW_DEFAULT_START_TIMEOUT_CMD = "systemctl show -p DefaultTimeoutStartUSec --value" @@ -402,38 +400,16 @@ return SBDTimeout.SBD_SERVANT_RESTART_INTERVAL_DEFAULT if value is None else value @staticmethod - def get_sbd_loop_timeout() -> int: - """ - Get loop timeout from the first configured SBD device metadata. - """ - dev_list = SBDUtils.get_sbd_device_from_config() - if not dev_list: - return SBDTimeout.SBD_LOOP_TIMEOUT_DEFAULT - device_metadata = SBDUtils.get_sbd_device_metadata(dev_list[0], timeout_only=True) - return device_metadata.get("loop", SBDTimeout.SBD_LOOP_TIMEOUT_DEFAULT) - - @staticmethod - def get_sbd_timeout_io() -> int: - """ - Get sbd async IO read timeout from SBD_OPTS -I option. - """ - value = SBDUtils.get_sbd_opts_int_value("-I") - if value is None: - return SBDTimeout.SBD_TIMEOUT_IO_LOOP_TIMEOUT_FACTOR * SBDTimeout.get_sbd_loop_timeout() - return value - - @staticmethod def get_sbd_watchdog_timeout_from_disk(dev) -> int|None: """ Get the watchdog timeout required by the SBD disk backstore. - multipath: 1.2 * (max_polling_interval + checker_timeout + servant_restart_interval - timeout_io) - SCSI: 1.2 * (scsi_timeout + servant_restart_interval - timeout_io) + multipath: 1.2 * (max_polling_interval + checker_timeout + servant_restart_interval) + SCSI: 1.2 * (scsi_timeout + servant_restart_interval) Returns None when the device is neither multipath nor SCSI. """ servant_restart_interval = SBDTimeout.get_sbd_servant_restart_interval() - timeout_io = SBDTimeout.get_sbd_timeout_io() if storage_utils.is_multipath_device(dev): timeout = (storage_utils.get_multipath_max_polling_interval(dev) or 0) \ + storage_utils.get_multipath_checker_timeout(dev) @@ -441,7 +417,7 @@ timeout = storage_utils.get_scsi_timeout(dev) else: return None - return max(1, int(1.2 * (timeout + servant_restart_interval - timeout_io))) + return max(1, int(1.2 * (timeout + servant_restart_interval))) @staticmethod def get_sbd_watchdog_timeout_with_qdevice() -> int|None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/crmsh/ui_cluster.py new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/ui_cluster.py --- old/crmsh-5.1.0+20261117.fd431ad0/crmsh/ui_cluster.py 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/ui_cluster.py 2026-11-19 10:35:40.000000000 +0100 @@ -592,7 +592,7 @@ return True @command.alias("delete") - @command.completers_repeating(compl.nodes) + @command.completers_repeating(compl.exclude_completed(compl.nodes)) @command.skill_level('administrator') def do_remove(self, context, *args): ''' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/crmsh/ui_configure.py new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/ui_configure.py --- old/crmsh-5.1.0+20261117.fd431ad0/crmsh/ui_configure.py 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/ui_configure.py 2026-11-19 10:35:40.000000000 +0100 @@ -222,7 +222,16 @@ lasttopic = '' @classmethod + def enabled(cls): + return options.in_repl() or options.shell_completion + + @classmethod def help(cls, topic, helptxt, args): + if options.shell_completion: + # bash_completion.sh collects these lines and prints them with the prompt redrawn + for line in (helptxt or "").splitlines(): + print(f"{constants.COMPGEN_HELP_PREFIX}{line}") + return if cls.lasttopic == topic and \ time.time() - cls.laststamp < cls.timeout: return @@ -247,7 +256,7 @@ if completing == 'params': return ['params'] if completing.endswith('='): - if len(completing) > 1 and options.in_repl(): + if len(completing) > 1 and CompletionHelp.enabled(): topic = completing[:-1] CompletionHelp.help(topic, agent.meta_parameter(topic), args) return [] @@ -262,7 +271,7 @@ if completing == 'meta': return ['meta'] if completing.endswith('='): - if len(completing) > 1 and options.in_repl(): + if len(completing) > 1 and CompletionHelp.enabled(): topic = completing[:-1] CompletionHelp.help(topic, agent.meta_parameter(topic), args) return [] @@ -501,7 +510,7 @@ # to show help messages if completing.endswith('='): - if len(completing) > 1 and options.in_repl(): + if len(completing) > 1 and CompletionHelp.enabled(): topic = completing[:-1] CompletionHelp.help(topic, container_helptxt(args, constants.container_helptxt, topic), args) return [] @@ -602,7 +611,7 @@ utils.page_string('\n'.join(diff)) @command.skill_level('administrator') - @command.completers_repeating(_id_show_list) + @command.completers_repeating(compl.exclude_completed(_id_show_list)) def do_show(self, context, *args): "usage: show [xml] [<id>...]" utils.load_cib_file_env() @@ -632,7 +641,11 @@ @command.name("get_property") @command.alias("get-property") @command.skill_level('administrator') - @command.completers_repeating(compl.call(ra.get_properties_without_deprecated)) + @command.completers_repeating( + compl.exclude_completed( + compl.call(ra.get_properties_without_deprecated) + ) + ) def do_get_property(self, context, *args): "usage: get-property [-t|--true [<name>...]" utils.load_cib_file_env() @@ -897,7 +910,7 @@ return len(to_stop) @command.skill_level('administrator') - @command.completers_repeating(_id_list) + @command.completers_repeating(compl.exclude_completed(_id_list)) @command.alias('rm') def do_delete(self, context, *args): "usage: delete [-f|--force] <id> [<id>...]" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/crmsh/ui_corosync.py new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/ui_corosync.py --- old/crmsh-5.1.0+20261117.fd431ad0/crmsh/ui_corosync.py 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/ui_corosync.py 2026-11-19 10:35:40.000000000 +0100 @@ -22,38 +22,6 @@ logger = logging.getLogger(__name__) -def _push_completer(args): - try: - n = utils.list_cluster_nodes() - n.remove(utils.this_node()) - if args[-1] in n: - # continue complete - return [args[-1]] - for item in args: - if item in n: - n.remove(item) - return n - except: - n = [] - - -def _diff_nodes(args): - try: - if len(args) > 3: - return [] - n = utils.list_cluster_nodes() - if args[-1] in n: - # continue complete - return [args[-1]] - for item in args: - if item in n: - # remove already complete item - n.remove(item) - return n - except: - return [] - - @dataclasses.dataclass class LinkArgumentParser: linknumber: int = -1 @@ -214,10 +182,10 @@ return False - @command.completer(completers.call(lambda: [ + @command.completers(completers.call(lambda: [ str(link.linknumber) for link in corosync.LinkManager.load_config_file().links() - if link and link.linknumber != 0 + if link ])) def do_remove(self, context, linknumber: str): if not linknumber.isdecimal(): @@ -338,7 +306,11 @@ return corosync.cfgtool('-R')[0] == 0 @command.skill_level('administrator') - @command.completers_repeating(_push_completer) + @command.completers_repeating( + completers.exclude_completed( + completers.call(utils.list_cluster_nodes_except_me) + ) + ) def do_push(self, context, *nodes): ''' Push corosync configuration to other cluster nodes. @@ -351,14 +323,16 @@ return corosync.push_configuration(nodes) @command.skill_level('administrator') - @command.completers(_push_completer) + @command.completers(completers.call(utils.list_cluster_nodes_except_me)) def do_pull(self, context, node): ''' Pull corosync configuration from another node. ''' return corosync.pull_configuration(node) - @command.completers_repeating(_diff_nodes) + @command.completers_repeating( + completers.exclude_completed(completers.call(lambda: utils.list_cluster_nodes() or [])) + ) def do_diff(self, context, *nodes): ''' Compare corosync configuration between nodes. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/crmsh/ui_node.py new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/ui_node.py --- old/crmsh-5.1.0+20261117.fd431ad0/crmsh/ui_node.py 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/ui_node.py 2026-11-19 10:35:40.000000000 +0100 @@ -301,7 +301,9 @@ return known @command.wait - @command.completers(compl.nodes, compl.choice(['on', 'off'])) + @command.completers_repeating( + compl.exclude_completed(compl.join(compl.nodes, compl.choice(['on', 'off']))) + ) def do_standby(self, context, *args): """ usage: standby [<node>...] [on|off] [<lifetime>] @@ -446,7 +448,7 @@ logger.info("Setting standby=true on node %s", node) @command.wait - @command.completers(compl.standby_nodes) + @command.completers_repeating(compl.exclude_completed(compl.standby_nodes)) def do_online(self, context, *args): """ usage: online [<node>] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/crmsh/ui_resource.py new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/ui_resource.py --- old/crmsh-5.1.0+20261117.fd431ad0/crmsh/ui_resource.py 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/ui_resource.py 2026-11-19 10:35:40.000000000 +0100 @@ -390,7 +390,7 @@ @command.alias('migrate') @command.skill_level('administrator') @command.wait - @command.completers_repeating(compl.resources, compl.nodes) + @command.completers(compl.resources, compl.nodes) def do_move(self, context, rsc, *args): """usage: move <rsc> [<node>] [<lifetime>] [force]""" if not utils.is_name_sane(rsc): @@ -435,7 +435,7 @@ @command.skill_level('administrator') @command.wait - @command.completers_repeating(compl.resources, compl.nodes) + @command.completers(compl.resources, compl.nodes) def do_ban(self, context, rsc, *args): """usage: ban <rsc> [<node>] [<lifetime>]""" if not utils.is_name_sane(rsc): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/crmsh/ui_sbd.py new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/ui_sbd.py --- old/crmsh-5.1.0+20261117.fd431ad0/crmsh/ui_sbd.py 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/crmsh/ui_sbd.py 2026-11-19 10:35:40.000000000 +0100 @@ -236,7 +236,6 @@ print(f"multipath checker_timeout : {checker_timeout}") if storage_utils.is_scsi_device(dev): print(f"SCSI timeout : {storage_utils.get_scsi_timeout(dev)}") - print(f"SBD timeout io : {sbd.SBDTimeout.get_sbd_timeout_io()}") print(f"SBD servant restart interval : {sbd.SBDTimeout.get_sbd_servant_restart_interval()}") def _show_property(self) -> None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/data-manifest new/crmsh-5.1.0+20261119.3c9d86d6/data-manifest --- old/crmsh-5.1.0+20261117.fd431ad0/data-manifest 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/data-manifest 2026-11-19 10:35:40.000000000 +0100 @@ -191,6 +191,7 @@ test/unittests/test_cibquery.py test/unittests/test_cliformat.py test/unittests/test_cluster_fs.py +test/unittests/test_completers.py test/unittests/test.conf test/unittests/test_corosync_config_format.py test/unittests/test_corosync_healthcheck.py @@ -223,6 +224,7 @@ test/unittests/test_storage_utils.py test/unittests/test_time.py test/unittests/test_ui_cluster.py +test/unittests/test_ui_configure.py test/unittests/test_ui_corosync.py test/unittests/test_ui_resource.py test/unittests/test_ui_sbd.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/doc/.gitignore new/crmsh-5.1.0+20261119.3c9d86d6/doc/.gitignore --- old/crmsh-5.1.0+20261117.fd431ad0/doc/.gitignore 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/doc/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -generated-sources/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/doc/Makefile new/crmsh-5.1.0+20261119.3c9d86d6/doc/Makefile --- old/crmsh-5.1.0+20261117.fd431ad0/doc/Makefile 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/doc/Makefile 1970-01-01 01:00:00.000000000 +0100 @@ -1,38 +0,0 @@ -export PATH := $(PATH):$(CURDIR)/toolchain/bin - -.PHONY: all clean subdirs website website-clean - -all: crm.8 - -generated-sources: - mkdir -p $@ - -generated-sources/Makefile: crm.8.adoc generated-sources - adocxt gen-makefile < $< > $@ - -subdirs: generated-sources/Makefile - $(MAKE) -C generated-sources all - -generated-sources/crm.8.adoc: crm.8.adoc subdirs - adocxt gen-include < $< > $@ - -generated-sources/crm.8.aio.adoc: generated-sources/crm.8.adoc generated-sources/profiles.adoc - adocaio $< > $@ - -generated-sources/profiles.adoc: profiles.adoc generated-sources - cp $< $@ - -crm.8.html: generated-sources/crm.8.aio.adoc - asciidoc $< - -crm.8: generated-sources/crm.8.aio.adoc - a2x -f manpage $< - -website: generated-sources/crm.8.adoc - $(MAKE) -C website-v1 all - -website-clean: - $(MAKE) -C website-v1 clean - -clean: website-clean - $(RM) -r generated-sources crm.8.html crm.8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/doc/crm.8.adoc new/crmsh-5.1.0+20261119.3c9d86d6/doc/crm.8.adoc --- old/crmsh-5.1.0+20261117.fd431ad0/doc/crm.8.adoc 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/doc/crm.8.adoc 2026-11-19 10:35:40.000000000 +0100 @@ -3777,7 +3777,7 @@ cluster properties is printed. To print one property's help, use the +--help+ option; or use <Tab> -to complete the help text for the property on interactive mode. +to complete the help text for the property. For more information on rule expressions, see <<topics.Syntax.RuleExpressions,Syntax: Rule expressions>>. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/doc/toolchain/bin/adocaio new/crmsh-5.1.0+20261119.3c9d86d6/doc/toolchain/bin/adocaio --- old/crmsh-5.1.0+20261117.fd431ad0/doc/toolchain/bin/adocaio 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/doc/toolchain/bin/adocaio 1970-01-01 01:00:00.000000000 +0100 @@ -1,33 +0,0 @@ -#!/usr/bin/env python3 -"""Preprocessor for include:: directive""" - - -import os.path -import re -import sys - - -RE_INCLUDE_DIRECTIVE = re.compile('^include::(.*)\\[]\\s*$') - - -def all_in_one(path: str, out): - dir = os.path.dirname(os.path.abspath(path)) - with open(path, 'r', encoding='utf-8') as f: - for line in f: - found = RE_INCLUDE_DIRECTIVE.match(line) - if not found: - out.write(line) - else: - included_filepath = f'{dir}/{found.group(1)}' - all_in_one(included_filepath, out) - - -def main(): - if len(sys.argv) != 2: - print(f'usage: {sys.argv[0]} [infile]') - sys.exit(1) - all_in_one(sys.argv[1], sys.stdout) - - -if __name__ == '__main__': - main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/doc/toolchain/bin/adocxt new/crmsh-5.1.0+20261119.3c9d86d6/doc/toolchain/bin/adocxt --- old/crmsh-5.1.0+20261117.fd431ad0/doc/toolchain/bin/adocxt 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/doc/toolchain/bin/adocxt 2026-11-19 10:35:40.000000000 +0100 @@ -1,109 +1,126 @@ #!/usr/bin/env python3 +"""Preprocessor for crm.8.adoc that expands 'From Code' sections and include:: directives.""" - +import argparse +import io +import os import re -import shlex +import subprocess import sys import typing +TOOLCHAIN_LIB_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'lib')) +if TOOLCHAIN_LIB_DIR not in sys.path: + sys.path.insert(0, TOOLCHAIN_LIB_DIR) + +from help2adoc import generator +from help2adoc import parser + RE_FROM_CODE = re.compile(r'^\[\[([^,]+),[^,]*,From Code]]$') RE_TAG = re.compile('^cmdhelp\\.(.*)$') RE_SECTION_TITLE = re.compile('^=') RE_ANCHOR_OR_SECTION_TITLE=re.compile(r'^(?:\[\[.*]]$|=)') +RE_INCLUDE_DIRECTIVE = re.compile(r'^include::(.*)\[]\s*$') TAG_EXCLUDES = { 'cmdhelp.root.report', } -def generate_makefile(stdin, stdout): - tags = list() - for line in stdin: - found = RE_FROM_CODE.match(line) - if found: - tag = found.group(1) - if tag in TAG_EXCLUDES: - continue - command = extract_command(tag) - tags.append(tag) - stdout.write(tag) - stdout.write('.txt:\n\t') - stdout.write(shlex.join(command)) - stdout.write(' > "$@"\n\n') - end(tags, stdout) - - -def extract_command(tag: str) -> typing.Sequence[str]: +def extract_command(tag: str, crm_bin: str) -> typing.Sequence[str]: found = RE_TAG.match(tag) if not found: raise RuntimeError(f'Invalid tag {tag}') - args = ['crm'] + args = [sys.executable, crm_bin] args.extend(found.group(1).split('.', 1)) args.append('--help-without-redirect') return args -def end(tags: typing.Sequence[str], stdout): - stdout.write( - '%.adoc: %.txt\n\thelp2adoc "$<" > "$*".adoc\n\n' - ) - stdout.write( - '.PHONY: clean all\n\nclean:\n\t$RM *.txt *.adoc\n\nall: ' - ) - for tag in tags: - stdout.write(tag) - stdout.write('.adoc ') - stdout.write('\n\n') +def convert_help_to_adoc(help_text: str, out: typing.TextIO): + lines = help_text.splitlines(keepends=True) + tokens = parser.LookAheadIterator(parser.lexer(iter(lines))) + generator.AsciiDocGenerator(out.write).parse_help(tokens) + token = tokens.lookahead() + if token is None: + return + epilog_start = token.lineno + out.write('....\n') + for line in lines[epilog_start:]: + out.write(line) + if not line.endswith('\n'): + out.write('\n') + out.write('....\n') + + +def render_tag_adoc(tag: str, crm_bin: str, out: typing.TextIO): + cmd = extract_command(tag, crm_bin) + res = subprocess.run(cmd, stdout=subprocess.PIPE, text=True, check=True) + convert_help_to_adoc(res.stdout, out) + out.write('\n') -def generate_include(stdin, stdout): +def process_file(path: str, crm_bin: str, out: typing.TextIO): + base_dir = os.path.dirname(os.path.abspath(path)) tag = None section_title = None - for line in stdin: - go_next_line = False - while not go_next_line: - match tag: - case None: - # initial state - found = RE_FROM_CODE.match(line) - if found: - found_tag = found.group(1) - if found_tag not in TAG_EXCLUDES: - tag = found_tag - stdout.write(line) - go_next_line = True - case _: - # found a tag - match section_title: - case None: - # waiting a section title - found = RE_SECTION_TITLE.match(line) - if found: - section_title = line - stdout.write(section_title) - print(f'include::{tag}.adoc[]\n', file=stdout) - break - case _: - # waiting for next section - found = RE_ANCHOR_OR_SECTION_TITLE.match(line) - if found: - tag = None - section_title = None - else: - go_next_line = True + with open(path, 'r', encoding='utf-8') as f: + for line in f: + include_match = RE_INCLUDE_DIRECTIVE.match(line) + if include_match and tag is None: + included_filepath = os.path.join(base_dir, include_match.group(1)) + process_file(included_filepath, crm_bin, out) + continue + + go_next_line = False + while not go_next_line: + match tag: + case None: + # initial state + found = RE_FROM_CODE.match(line) + if found: + found_tag = found.group(1) + if found_tag not in TAG_EXCLUDES: + tag = found_tag + out.write(line) + go_next_line = True + case _: + # found a tag + match section_title: + case None: + # waiting a section title + found = RE_SECTION_TITLE.match(line) + if found: + section_title = line + out.write(section_title) + render_tag_adoc(tag, crm_bin, out) + break + case _: + # waiting for next section + found = RE_ANCHOR_OR_SECTION_TITLE.match(line) + if found: + tag = None + section_title = None + else: + go_next_line = True def main(): - if len(sys.argv) != 2: - print(f'Usage: {sys.argv[0]} gen-makefile|gen-include', file=sys.stderr) - return 1 - match sys.argv[1]: - case 'gen-makefile': - generate_makefile(sys.stdin, sys.stdout) - case 'gen-include': - generate_include(sys.stdin, sys.stdout) - + ap = argparse.ArgumentParser(prog='adocxt') + ap.add_argument('--crm', required=True, help='Path to bin/crm script') + ap.add_argument('-o', '--output', help='Output file path (default: stdout)') + ap.add_argument('input', help='Input adoc file') + args = ap.parse_args() + + buf = io.StringIO() + process_file(args.input, args.crm, buf) + + if args.output: + with open(args.output, 'w', encoding='utf-8') as out_f: + out_f.write(buf.getvalue()) + else: + sys.stdout.write(buf.getvalue()) if __name__ == '__main__': diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/doc/toolchain/bin/help2adoc new/crmsh-5.1.0+20261119.3c9d86d6/doc/toolchain/bin/help2adoc --- old/crmsh-5.1.0+20261117.fd431ad0/doc/toolchain/bin/help2adoc 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/doc/toolchain/bin/help2adoc 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -#!/bin/bash -set -e -SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}") -export PYTHONPATH=$(readlink -f "${SCRIPT_DIR}"/../lib) -python3 -m help2adoc.main "$@" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/doc/toolchain/lib/help2adoc/main.py new/crmsh-5.1.0+20261119.3c9d86d6/doc/toolchain/lib/help2adoc/main.py --- old/crmsh-5.1.0+20261117.fd431ad0/doc/toolchain/lib/help2adoc/main.py 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/doc/toolchain/lib/help2adoc/main.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,28 +0,0 @@ -from .parser import lexer, LookAheadIterator -from .generator import AsciiDocGenerator - -from argparse import ArgumentParser -import sys - -def main(): - ap = ArgumentParser('help2adoc') - ap.add_argument('file') - args = ap.parse_args() - with open(args.file, 'r') as f: - tokens = LookAheadIterator(lexer(f)) - AsciiDocGenerator(sys.stdout.write).parse_help(tokens) - token = tokens.lookahead() - if token is None: - return - epilog_start = token.lineno - f.seek(0) - for i in range(epilog_start): - next(f) - print('....') - for line in f: - print(line, end='') - print('....') - - -if __name__ == '__main__': - main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/meson.build new/crmsh-5.1.0+20261119.3c9d86d6/meson.build --- old/crmsh-5.1.0+20261117.fd431ad0/meson.build 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/meson.build 2026-11-19 10:35:40.000000000 +0100 @@ -97,26 +97,32 @@ ) # Process documentation -make = find_program('make') -sh = find_program('sh') a2x = find_program('a2x') asciidoc = find_program('asciidoc') env = environment() -env.prepend('PATH', meson.project_source_root() / 'bin') -env.prepend('PATH', meson.project_source_root() / 'doc/toolchain/bin') env.set('PYTHONPATH', meson.project_source_root()) env.set('CRM_HELP_FILE', meson.project_source_root() / 'doc/crm.8.adoc') install_data('doc/crm.8.adoc', install_dir: datadir / 'crmsh') -crm_8 = custom_target('crm_8', +crm_8_aio_adoc = custom_target('crm_8_aio_adoc', input: ['doc/crm.8.adoc'], - output: ['crm.8'], + output: ['crm.8.aio.adoc'], + depend_files: ['doc/profiles.adoc', 'bin/crm'] + py_sources, command: [ - sh, '-c', - 'make -C "@0@/doc" all && cp "@0@/doc/generated-sources/crm.8" "@OUTPUT@"'.format(meson.project_source_root()) + py, + meson.project_source_root() / 'doc/toolchain/bin/adocxt', + '--crm', meson.project_source_root() / 'bin/crm', + '-o', '@OUTPUT@', + '@INPUT@', ], env: env, +) + +crm_8 = custom_target('crm_8', + input: [crm_8_aio_adoc], + output: ['crm.8'], + command: [a2x, '-f', 'manpage', '-D', '@OUTDIR@', '@INPUT@'], install: true, install_dir: get_option('mandir') / 'man8' ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/test/unittests/test_completers.py new/crmsh-5.1.0+20261119.3c9d86d6/test/unittests/test_completers.py --- old/crmsh-5.1.0+20261117.fd431ad0/test/unittests/test_completers.py 1970-01-01 01:00:00.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/test/unittests/test_completers.py 2026-11-19 10:35:40.000000000 +0100 @@ -0,0 +1,82 @@ +import unittest +from unittest import mock + +from crmsh import completers +from crmsh import corosync +from crmsh import ui_cluster +from crmsh import ui_corosync +from crmsh import ui_node +from crmsh import ui_resource + + +class TestExcludeCompleted(unittest.TestCase): + def setUp(self): + self.completer = completers.exclude_completed(completers.choice(['n1', 'n10', 'n2'])) + + def test_no_completed(self): + self.assertEqual(['n1', 'n10', 'n2'], self.completer(['remove', ''])) + + def test_exclude_completed(self): + self.assertEqual(['n10'], self.completer(['remove', 'n1', 'n2', 'n'])) + + def test_current_word_is_kept(self): + self.assertEqual(['n1', 'n10', 'n2'], self.completer(['remove', 'n1'])) + + def test_start_index(self): + completer = completers.exclude_completed(completers.choice(['a', 'b']), start_index=2) + self.assertEqual(['a', 'b'], completer(['cmd', 'a', ''])) + self.assertEqual(['b'], completer(['cmd', 'x', 'a', ''])) + + +class TestCommandCompleters(unittest.TestCase): + @mock.patch('crmsh.xmlutil.CrmMonXMLParser') + def test_cluster_remove_excludes_completed_nodes(self, mock_parser): + mock_parser.return_value.get_node_list.return_value = ['n1', 'n2', 'n3'] + completer = ui_cluster.Cluster.do_remove._completer + self.assertEqual(['n1', 'n3'], completer(['remove', 'n2', ''])) + + @mock.patch('crmsh.xmlutil.CrmMonXMLParser') + def test_node_online_completes_all_standby_nodes(self, mock_parser): + mock_parser.return_value.get_node_list.return_value = ['n1', 'n2', 'n3'] + completer = ui_node.NodeMgmt.do_online._completer + self.assertEqual(['n2', 'n3'], completer(['online', 'n1', ''])) + + @mock.patch('crmsh.xmlutil.CrmMonXMLParser') + def test_node_standby_completes_remaining_nodes(self, mock_parser): + mock_parser.return_value.get_node_list.return_value = ['n1', 'n2'] + completer = ui_node.NodeMgmt.do_standby._completer + self.assertEqual(['n2', 'on', 'off'], completer(['standby', 'n1', ''])) + self.assertEqual(['n1', 'n2', 'off'], completer(['standby', 'on', ''])) + + @mock.patch('crmsh.completers.xmlutil.CrmMonXMLParser') + def test_resource_move_and_ban_complete_only_one_node(self, mock_parser): + mock_parser.return_value.get_node_list.return_value = ['n1', 'n2'] + for command in (ui_resource.RscMgmt.do_move, ui_resource.RscMgmt.do_ban): + self.assertEqual(['n1', 'n2'], command._completer(['move', 'rsc1', ''])) + self.assertEqual([], command._completer(['move', 'rsc1', 'n1', ''])) + + @mock.patch('crmsh.utils.this_node', return_value='n1') + @mock.patch('crmsh.utils.list_cluster_nodes', return_value=['n1', 'n2', 'n3']) + def test_corosync_push_and_pull(self, mock_nodes, mock_this): + self.assertEqual(['n3'], ui_corosync.Corosync.do_push._completer(['push', 'n2', ''])) + self.assertEqual(['n2', 'n3'], ui_corosync.Corosync.do_pull._completer(['pull', ''])) + self.assertEqual([], ui_corosync.Corosync.do_pull._completer(['pull', 'n2', ''])) + + @mock.patch('crmsh.utils.list_cluster_nodes', return_value=['n1', 'n2', 'n3', 'n4']) + def test_corosync_diff(self, mock_nodes): + completer = ui_corosync.Corosync.do_diff._completer + self.assertEqual(['n1', 'n2', 'n3', 'n4'], completer(['diff', ''])) + self.assertEqual(['n3', 'n4'], completer(['diff', 'n1', 'n2', ''])) + + @mock.patch('crmsh.utils.list_cluster_nodes', return_value=None) + def test_corosync_diff_without_cluster(self, mock_nodes): + self.assertEqual([], ui_corosync.Corosync.do_diff._completer(['diff', ''])) + + @mock.patch('crmsh.corosync.LinkManager.load_config_file') + def test_corosync_link_remove(self, mock_load): + mock_load.return_value.links.return_value = [ + corosync.Link(0, []), None, corosync.Link(2, []), + ] + completer = ui_corosync.Link.do_remove._completer + self.assertEqual(['0', '2'], completer(['remove', ''])) + self.assertEqual([], completer(['remove', '0', ''])) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/test/unittests/test_sbd.py new/crmsh-5.1.0+20261119.3c9d86d6/test/unittests/test_sbd.py --- old/crmsh-5.1.0+20261117.fd431ad0/test/unittests/test_sbd.py 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/test/unittests/test_sbd.py 2026-11-19 10:35:40.000000000 +0100 @@ -244,57 +244,20 @@ result = sbd.SBDTimeout.get_sbd_servant_restart_interval() self.assertEqual(result, 0) - @patch("crmsh.sbd.SBDUtils.get_sbd_device_metadata") - @patch("crmsh.sbd.SBDUtils.get_sbd_device_from_config") - def test_get_sbd_loop_timeout(self, mock_get_sbd_device_from_config, mock_get_sbd_device_metadata): - mock_get_sbd_device_from_config.return_value = ["/dev/sbd_device"] - mock_get_sbd_device_metadata.return_value = {"loop": 2} - result = sbd.SBDTimeout.get_sbd_loop_timeout() - self.assertEqual(result, 2) - - @patch("crmsh.sbd.SBDUtils.get_sbd_device_from_config") - def test_get_sbd_loop_timeout_default(self, mock_get_sbd_device_from_config): - mock_get_sbd_device_from_config.return_value = [] - result = sbd.SBDTimeout.get_sbd_loop_timeout() - self.assertEqual(result, 1) - - @patch("crmsh.sbd.SBDUtils.get_sbd_value_from_config") - def test_get_sbd_timeout_io(self, mock_get_sbd_value_from_config): - mock_get_sbd_value_from_config.return_value = "-S 1 -I 9 -P" - result = sbd.SBDTimeout.get_sbd_timeout_io() - self.assertEqual(result, 9) - - @patch("crmsh.sbd.SBDUtils.get_sbd_value_from_config") - def test_get_sbd_timeout_io_zero(self, mock_get_sbd_value_from_config): - mock_get_sbd_value_from_config.return_value = "-I 0" - result = sbd.SBDTimeout.get_sbd_timeout_io() - self.assertEqual(result, 0) - - @patch("crmsh.sbd.SBDTimeout.get_sbd_loop_timeout") - @patch("crmsh.sbd.SBDUtils.get_sbd_value_from_config") - def test_get_sbd_timeout_io_default(self, mock_get_sbd_value_from_config, mock_get_sbd_loop_timeout): - mock_get_sbd_value_from_config.return_value = None - mock_get_sbd_loop_timeout.return_value = 2 - result = sbd.SBDTimeout.get_sbd_timeout_io() - self.assertEqual(result, 6) - @patch("crmsh.storage_utils.get_multipath_checker_timeout") @patch("crmsh.storage_utils.get_multipath_max_polling_interval") @patch("crmsh.storage_utils.is_scsi_device") @patch("crmsh.storage_utils.is_multipath_device") - @patch("crmsh.sbd.SBDTimeout.get_sbd_timeout_io") @patch("crmsh.sbd.SBDTimeout.get_sbd_servant_restart_interval") def test_get_sbd_watchdog_timeout_from_disk_multipath( self, mock_get_servant_restart_interval, - mock_get_timeout_io, mock_is_multipath_device, mock_is_scsi_device, mock_get_multipath_max_polling_interval, mock_get_multipath_checker_timeout, ): mock_get_servant_restart_interval.return_value = 5 - mock_get_timeout_io.return_value = 3 mock_is_multipath_device.return_value = True mock_is_scsi_device.return_value = False mock_get_multipath_max_polling_interval.return_value = 20 @@ -302,48 +265,42 @@ result = sbd.SBDTimeout.get_sbd_watchdog_timeout_from_disk("/dev/mapper/mpatha") - self.assertEqual(result, 62) + self.assertEqual(result, 66) @patch("crmsh.storage_utils.get_scsi_timeout") @patch("crmsh.storage_utils.is_scsi_device") @patch("crmsh.storage_utils.is_multipath_device") - @patch("crmsh.sbd.SBDTimeout.get_sbd_timeout_io") @patch("crmsh.sbd.SBDTimeout.get_sbd_servant_restart_interval") def test_get_sbd_watchdog_timeout_from_disk_scsi( self, mock_get_servant_restart_interval, - mock_get_timeout_io, mock_is_multipath_device, mock_is_scsi_device, mock_get_scsi_timeout, ): mock_get_servant_restart_interval.return_value = 5 - mock_get_timeout_io.return_value = 3 mock_is_multipath_device.return_value = False mock_is_scsi_device.return_value = True mock_get_scsi_timeout.return_value = 30 result = sbd.SBDTimeout.get_sbd_watchdog_timeout_from_disk("/dev/sda1") - self.assertEqual(result, 38) + self.assertEqual(result, 42) @patch("crmsh.storage_utils.get_multipath_checker_timeout") @patch("crmsh.storage_utils.get_multipath_max_polling_interval") @patch("crmsh.storage_utils.is_scsi_device") @patch("crmsh.storage_utils.is_multipath_device") - @patch("crmsh.sbd.SBDTimeout.get_sbd_timeout_io") @patch("crmsh.sbd.SBDTimeout.get_sbd_servant_restart_interval") def test_get_sbd_watchdog_timeout_from_disk_clamp( self, mock_get_servant_restart_interval, - mock_get_timeout_io, mock_is_multipath_device, mock_is_scsi_device, mock_get_multipath_max_polling_interval, mock_get_multipath_checker_timeout, ): mock_get_servant_restart_interval.return_value = 0 - mock_get_timeout_io.return_value = 10 mock_is_multipath_device.return_value = True mock_is_scsi_device.return_value = False mock_get_multipath_max_polling_interval.return_value = 0 @@ -355,17 +312,14 @@ @patch("crmsh.storage_utils.is_scsi_device") @patch("crmsh.storage_utils.is_multipath_device") - @patch("crmsh.sbd.SBDTimeout.get_sbd_timeout_io") @patch("crmsh.sbd.SBDTimeout.get_sbd_servant_restart_interval") def test_get_sbd_watchdog_timeout_from_disk_not_multipath_nor_scsi( self, mock_get_servant_restart_interval, - mock_get_timeout_io, mock_is_multipath_device, mock_is_scsi_device, ): mock_get_servant_restart_interval.return_value = 5 - mock_get_timeout_io.return_value = 3 mock_is_multipath_device.return_value = False mock_is_scsi_device.return_value = False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/test/unittests/test_ui_configure.py new/crmsh-5.1.0+20261119.3c9d86d6/test/unittests/test_ui_configure.py --- old/crmsh-5.1.0+20261117.fd431ad0/test/unittests/test_ui_configure.py 1970-01-01 01:00:00.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/test/unittests/test_ui_configure.py 2026-11-19 10:35:40.000000000 +0100 @@ -0,0 +1,24 @@ +import unittest +from unittest import mock + +from crmsh import constants +from crmsh import ui_configure + + [email protected]('crmsh.ui_configure.options') +class TestCompletionHelp(unittest.TestCase): + def test_enabled(self, mock_options): + for in_repl, shell_completion, expected in ( + (False, False, False), (True, False, True), (False, True, True)): + mock_options.in_repl.return_value = in_repl + mock_options.shell_completion = shell_completion + self.assertEqual(expected, ui_configure.CompletionHelp.enabled()) + + @mock.patch('builtins.print') + def test_help_shell_completion(self, mock_print, mock_options): + mock_options.shell_completion = True + ui_configure.CompletionHelp.help('topic', 'line1\nline2', ['property', 'topic=']) + mock_print.assert_has_calls([ + mock.call(f'{constants.COMPGEN_HELP_PREFIX}line1'), + mock.call(f'{constants.COMPGEN_HELP_PREFIX}line2'), + ]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-5.1.0+20261117.fd431ad0/test/unittests/test_ui_sbd.py new/crmsh-5.1.0+20261119.3c9d86d6/test/unittests/test_ui_sbd.py --- old/crmsh-5.1.0+20261117.fd431ad0/test/unittests/test_ui_sbd.py 2026-11-17 09:27:14.000000000 +0100 +++ new/crmsh-5.1.0+20261119.3c9d86d6/test/unittests/test_ui_sbd.py 2026-11-19 10:35:40.000000000 +0100 @@ -201,7 +201,6 @@ @mock.patch("crmsh.storage_utils.get_multipath_max_polling_interval") @mock.patch("crmsh.storage_utils.is_multipath_device") @mock.patch("crmsh.storage_utils.is_scsi_device") - @mock.patch("crmsh.sbd.SBDTimeout.get_sbd_timeout_io") @mock.patch("crmsh.sbd.SBDTimeout.get_sbd_servant_restart_interval") @mock.patch("crmsh.storage_utils.get_scsi_timeout") @mock.patch("logging.Logger.info") @@ -212,7 +211,6 @@ mock_logger_info, mock_get_scsi_timeout, mock_get_sbd_servant_restart_interval, - mock_get_sbd_timeout_io, mock_is_scsi_device, mock_is_multipath_device, mock_get_multipath_max_polling_interval, @@ -221,7 +219,6 @@ mock_get_scsi_timeout.return_value = 30 mock_is_scsi_device.return_value = True mock_get_sbd_servant_restart_interval.return_value = 5 - mock_get_sbd_timeout_io.return_value = 3 mock_is_multipath_device.return_value = True mock_get_multipath_max_polling_interval.return_value = 20 mock_get_multipath_checker_timeout.return_value = 30 @@ -233,7 +230,6 @@ mock.call("multipath max_polling_interval: 20"), mock.call("multipath checker_timeout : 30"), mock.call("SCSI timeout : 30"), - mock.call("SBD timeout io : 3"), mock.call("SBD servant restart interval : 5"), ]) @@ -241,7 +237,6 @@ @mock.patch("crmsh.storage_utils.get_multipath_max_polling_interval") @mock.patch("crmsh.storage_utils.is_multipath_device") @mock.patch("crmsh.storage_utils.is_scsi_device") - @mock.patch("crmsh.sbd.SBDTimeout.get_sbd_timeout_io") @mock.patch("crmsh.sbd.SBDTimeout.get_sbd_servant_restart_interval") @mock.patch("crmsh.storage_utils.get_scsi_timeout") @mock.patch("logging.Logger.info") @@ -252,7 +247,6 @@ mock_logger_info, mock_get_scsi_timeout, mock_get_sbd_servant_restart_interval, - mock_get_sbd_timeout_io, mock_is_scsi_device, mock_is_multipath_device, mock_get_multipath_max_polling_interval, @@ -261,7 +255,6 @@ mock_get_scsi_timeout.return_value = 30 mock_is_scsi_device.return_value = True mock_get_sbd_servant_restart_interval.return_value = 5 - mock_get_sbd_timeout_io.return_value = 3 mock_is_multipath_device.return_value = False self.sbd_instance_diskbased._show_disk_backstore() @@ -271,13 +264,11 @@ mock_get_multipath_checker_timeout.assert_not_called() mock_print.assert_has_calls([ mock.call("SCSI timeout : 30"), - mock.call("SBD timeout io : 3"), mock.call("SBD servant restart interval : 5"), ]) @mock.patch("crmsh.storage_utils.is_multipath_device") @mock.patch("crmsh.storage_utils.is_scsi_device") - @mock.patch("crmsh.sbd.SBDTimeout.get_sbd_timeout_io") @mock.patch("crmsh.sbd.SBDTimeout.get_sbd_servant_restart_interval") @mock.patch("crmsh.storage_utils.get_scsi_timeout") @mock.patch("logging.Logger.info") @@ -288,12 +279,10 @@ mock_logger_info, mock_get_scsi_timeout, mock_get_sbd_servant_restart_interval, - mock_get_sbd_timeout_io, mock_is_scsi_device, mock_is_multipath_device, ): mock_get_sbd_servant_restart_interval.return_value = 5 - mock_get_sbd_timeout_io.return_value = 3 mock_is_scsi_device.return_value = False mock_is_multipath_device.return_value = False @@ -302,7 +291,6 @@ mock_logger_info.assert_called_once_with("crm sbd configure show disk_backstore") mock_get_scsi_timeout.assert_not_called() mock_print.assert_has_calls([ - mock.call("SBD timeout io : 3"), mock.call("SBD servant restart interval : 5"), ])
