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-02-21 15:36:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crmsh (Old) and /work/SRC/openSUSE:Factory/.crmsh.new.22824 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh" Tue Feb 21 15:36:22 2023 rev:280 rq:1066897 version:4.4.1+20230221.eb38cb6e Changes: -------- --- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2023-02-17 16:46:01.311206218 +0100 +++ /work/SRC/openSUSE:Factory/.crmsh.new.22824/crmsh.changes 2023-02-21 15:36:34.648471625 +0100 @@ -1,0 +2,6 @@ +Tue Feb 21 03:11:17 UTC 2023 - xli...@suse.com + +- Update to version 4.4.1+20230221.eb38cb6e: + * Dev: utils: Change the way to get pacemaker's version (bsc#1208216) + +------------------------------------------------------------------- Old: ---- crmsh-4.4.1+20230217.7fe11a5c.tar.bz2 New: ---- crmsh-4.4.1+20230221.eb38cb6e.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.spec ++++++ --- /var/tmp/diff_new_pack.ZJawzP/_old 2023-02-21 15:36:35.324475510 +0100 +++ /var/tmp/diff_new_pack.ZJawzP/_new 2023-02-21 15:36:35.332475556 +0100 @@ -36,7 +36,7 @@ Summary: High Availability cluster command-line interface License: GPL-2.0-or-later Group: %{pkg_group} -Version: 4.4.1+20230217.7fe11a5c +Version: 4.4.1+20230221.eb38cb6e Release: 0 URL: http://crmsh.github.io Source0: %{name}-%{version}.tar.bz2 ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.ZJawzP/_old 2023-02-21 15:36:35.400475947 +0100 +++ /var/tmp/diff_new_pack.ZJawzP/_new 2023-02-21 15:36:35.404475970 +0100 @@ -9,7 +9,7 @@ </service> <service name="tar_scm"> <param name="url">https://github.com/ClusterLabs/crmsh.git</param> - <param name="changesrevision">ad11a0c0cd93f6d30ad3b836149fdf5a99a8ad99</param> + <param name="changesrevision">61f8d99e061ce5bed9285b846e9494e556a7763c</param> </service> </servicedata> (No newline at EOF) ++++++ crmsh-4.4.1+20230217.7fe11a5c.tar.bz2 -> crmsh-4.4.1+20230221.eb38cb6e.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/cibconfig.py new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/cibconfig.py --- old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/cibconfig.py 2023-02-17 09:55:45.000000000 +0100 +++ new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/cibconfig.py 2023-02-21 03:39:22.000000000 +0100 @@ -28,7 +28,7 @@ from .ra import get_ra, get_properties_list, get_pe_meta, get_properties_meta, RAInfo from .utils import ext_cmd, safe_open_w, pipe_string, safe_close_w, crm_msec from .utils import ask, lines2cli, olist -from .utils import page_string, cibadmin_can_patch, str2tmp, ensure_sudo_readable +from .utils import page_string, str2tmp, ensure_sudo_readable from .utils import run_ptest, is_id_valid, edit_file, get_boolean, filter_string from .xmlutil import is_child_rsc, rsc_constraint, sanitize_cib, rename_id, get_interesting_nodes from .xmlutil import is_pref_location, get_topnode, new_cib, get_rscop_defaults_meta_node @@ -2619,7 +2619,7 @@ 'Commit the configuration to the CIB.' if not self.is_cib_sane(): return False - if not replace and cibadmin_can_patch(): + if not replace: rc = self._patch_cib(force) else: rc = self._replace_cib(force) @@ -2783,9 +2783,8 @@ cib = text2elem(cib) if not self._import_cib(cib): return False - if cibadmin_can_patch(): - self.cib_orig = copy.deepcopy(self.cib_elem) - sanitize_cib_for_patching(self.cib_orig) + self.cib_orig = copy.deepcopy(self.cib_elem) + sanitize_cib_for_patching(self.cib_orig) sanitize_cib(self.cib_elem) show_unrecognized_elems(self.cib_elem) self._populate() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/history.py new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/history.py --- old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/history.py 2023-02-17 09:55:45.000000000 +0100 +++ new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/history.py 2023-02-21 03:39:22.000000000 +0100 @@ -555,7 +555,6 @@ i = (i+1) % len(self.nodecolors) def _report_setup_source(self): - constants.pcmk_version = None # is this an crm report or a crm_report? for descname in ("description.txt", "report.summary"): self.desc = os.path.join(self.loc, descname) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/log_patterns.py new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/log_patterns.py --- old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/log_patterns.py 2023-02-17 09:55:45.000000000 +0100 +++ new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/log_patterns.py 2023-02-21 03:39:22.000000000 +0100 @@ -142,7 +142,7 @@ def patterns(cib_f=None): - is118 = utils.is_pcmk_118(cib_f=cib_f) + is118 = utils.is_larger_than_pcmk_118(cib_f=cib_f) if is118: return _patterns_118 else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/main.py new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/main.py --- old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/main.py 2023-02-17 09:55:45.000000000 +0100 +++ new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/main.py 2023-02-21 03:39:22.000000000 +0100 @@ -158,12 +158,6 @@ options.interactive = True -def compatibility_setup(): - if not utils.is_pcmk_118(): - del constants.attr_defaults["node"] - constants.cib_no_section_rc = 22 - - def add_quotes(args): ''' Add quotes if there's whitespace in one of the @@ -250,7 +244,6 @@ Main input loop for crmsh. Parses input line by line. """ - compatibility_setup() rc = handle_noninteractive_use(context, user_args) if rc is not None: return rc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/ui_configure.py new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/ui_configure.py --- old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/ui_configure.py 2023-02-17 09:55:45.000000000 +0100 +++ new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/ui_configure.py 2023-02-21 03:39:22.000000000 +0100 @@ -901,7 +901,6 @@ logger.info("apparently there is nothing to commit") logger.info("try changing something first") return True - replace = replace or not utils.cibadmin_can_patch() rc1 = True if replace and not force: rc1 = cib_factory.is_current_cib_equal() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/ui_node.py new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/ui_node.py --- old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/ui_node.py 2023-02-17 09:55:45.000000000 +0100 +++ new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/ui_node.py 2023-02-21 03:39:22.000000000 +0100 @@ -476,7 +476,7 @@ if not config.core.force and \ not utils.ask("Do you really want to drop state for node %s?" % node): return False - if utils.is_pcmk_118(): + if utils.is_larger_than_pcmk_118(): cib_elem = xmlutil.cibdump2elem() if cib_elem is None: return False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/utils.py new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/utils.py --- old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/utils.py 2023-02-17 09:55:45.000000000 +0100 +++ new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/utils.py 2023-02-21 03:39:22.000000000 +0100 @@ -1676,32 +1676,15 @@ return True, _graph_d -def get_pcmk_version(dflt): - version = dflt - - crmd = pacemaker_controld() - if crmd: - cmd = crmd - else: - return version - - try: - rc, s, err = get_stdout_stderr("%s version" % (cmd)) - if rc != 0: - logger.error("%s exited with %d [err: %s][out: %s]", cmd, rc, err, s) - else: - if err.startswith("CRM Version:"): - version = s.split()[0] - else: - version = s.split()[2] - logger.debug("found pacemaker version: %s", version) - except Exception as msg: - logger.warning("could not get the pacemaker version, bad installation?") - logger.warning(msg) +def get_pcmk_version(): + cmd = "/usr/sbin/pacemakerd --version" + out = get_stdout_or_raise_error(cmd) + version = out.split()[1] + logger.debug("Found pacemaker version: %s", version) return version -def get_cib_property(cib_f, attr, dflt): +def get_cib_property(cib_f, attr, dflt=None): """A poor man's get attribute procedure. We don't want heavy parsing, this needs to be relatively fast. @@ -1769,14 +1752,17 @@ def is_min_pcmk_ver(min_ver, cib_f=None): if not constants.pcmk_version: if cib_f: - constants.pcmk_version = get_cib_property(cib_f, "dc-version", "1.1.11") - logger.debug("found pacemaker version: %s in cib: %s", constants.pcmk_version, cib_f) + constants.pcmk_version = get_cib_property(cib_f, "dc-version") + if constants.pcmk_version: + logger.debug("Found pacemaker version: %s in cib: %s", constants.pcmk_version, cib_f) + else: + fatal(f"Failed to get 'dc-version' from {cib_f}") else: - constants.pcmk_version = get_pcmk_version("1.1.11") + constants.pcmk_version = get_pcmk_version() return is_larger_than_min_version(constants.pcmk_version, min_ver) -def is_pcmk_118(cib_f=None): +def is_larger_than_pcmk_118(cib_f=None): return is_min_pcmk_ver("1.1.8", cib_f=cib_f) @@ -1794,12 +1780,6 @@ return [] -@memoize -def cibadmin_can_patch(): - # cibadmin -P doesn't handle comments in <1.1.11 (unless patched) - return is_min_pcmk_ver("1.1.11") - - # quote function from python module shlex.py in python 3.3 _find_unsafe = re.compile(r'[^\w@%+=:,./-]').search diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/xmlutil.py new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/xmlutil.py --- old/crmsh-4.4.1+20230217.7fe11a5c/crmsh/xmlutil.py 2023-02-17 09:55:45.000000000 +0100 +++ new/crmsh-4.4.1+20230221.eb38cb6e/crmsh/xmlutil.py 2023-02-21 03:39:22.000000000 +0100 @@ -137,7 +137,7 @@ rc, outp, errp = sudocall(cmd) if rc == 0: return text2elem(outp) - elif rc != constants.cib_no_section_rc: + else: logger.error("running %s: %s", cmd, errp) return None