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-06-19 22:50:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crmsh (Old) and /work/SRC/openSUSE:Factory/.crmsh.new.15902 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh" Mon Jun 19 22:50:39 2023 rev:299 rq:1093731 version:4.5.0+20230619.01463a46 Changes: -------- --- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2023-06-16 16:56:52.598426841 +0200 +++ /work/SRC/openSUSE:Factory/.crmsh.new.15902/crmsh.changes 2023-06-19 22:50:45.869633161 +0200 @@ -1,0 +2,6 @@ +Mon Jun 19 06:36:03 UTC 2023 - xli...@suse.com + +- Update to version 4.5.0+20230619.01463a46: + * medium: ui_node: fix cib rollback race on node standby + +------------------------------------------------------------------- Old: ---- crmsh-4.5.0+20230616.cf763cd1.tar.bz2 New: ---- crmsh-4.5.0+20230619.01463a46.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.spec ++++++ --- /var/tmp/diff_new_pack.b56m9H/_old 2023-06-19 22:50:47.485642624 +0200 +++ /var/tmp/diff_new_pack.b56m9H/_new 2023-06-19 22:50:47.493642670 +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+20230616.cf763cd1 +Version: 4.5.0+20230619.01463a46 Release: 0 Url: http://crmsh.github.io Source0: %{name}-%{version}.tar.bz2 ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.b56m9H/_old 2023-06-19 22:50:47.549642998 +0200 +++ /var/tmp/diff_new_pack.b56m9H/_new 2023-06-19 22:50:47.553643022 +0200 @@ -9,7 +9,7 @@ </service> <service name="tar_scm"> <param name="url">https://github.com/ClusterLabs/crmsh.git</param> - <param name="changesrevision">e69c76eeac27ae8ba34a75e2baed215e26ceb224</param> + <param name="changesrevision">87965cbe2c3b7d719172d79f93ab18254306d244</param> </service> </servicedata> (No newline at EOF) ++++++ crmsh-4.5.0+20230616.cf763cd1.tar.bz2 -> crmsh-4.5.0+20230619.01463a46.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.5.0+20230616.cf763cd1/crmsh/ui_node.py new/crmsh-4.5.0+20230619.01463a46/crmsh/ui_node.py --- old/crmsh-4.5.0+20230616.cf763cd1/crmsh/ui_node.py 2023-06-16 10:11:36.000000000 +0200 +++ new/crmsh-4.5.0+20230619.01463a46/crmsh/ui_node.py 2023-06-19 08:01:11.000000000 +0200 @@ -3,6 +3,7 @@ # See COPYING for license information. import re +import copy import subprocess from argparse import ArgumentParser, RawDescriptionHelpFormatter @@ -375,6 +376,24 @@ xml_query_path_oppsite = constants.XML_NODE_QUERY_STANDBY_PATH cib = xmlutil.cibdump2elem() + # IMPORTANT: + # Do NOT call cibdump2elem twice, or you risk a race where the + # resulting diff will contain more changes than the values for + # "standby", potentially rolling back the effect of other operations. + # Really use the same xml as "original" and basis for the changes. + # Thus the "deepcopy" here. + # + # Possible optimization: instead of deepcopy here and xml_tostring + # below and str2tmp in diff_and_patch you probably want to change + # diff_and_patch to accept a file (as well), then + # from . import tmpfiles + # orig_cib_tmpfile = xmlutil.cibdump2tmp() + # tmpfiles.add(orig_cib_tmpfile) + # cib = xmlutil.file2cib_elem(orig_cib_tmpfile) + # ... + # diff_and_patch(orig_file=orig_cib_tmpfile, new_str=xmlutil.xml_tostring(cib)) + orig_cib = copy.deepcopy(cib) + xml_item_list = cib.xpath(xml_path) for xml_item in xml_item_list: if xml_item.get("uname") in node_list: @@ -396,7 +415,6 @@ res_item = xmlutil.get_set_nodes(interface_item, "instance_attributes", create=True) xmlutil.set_attr(res_item[0], "standby", "on") - orig_cib = xmlutil.cibdump2elem() rc = utils.diff_and_patch(xmlutil.xml_tostring(orig_cib), xmlutil.xml_tostring(cib)) if not rc: return False @@ -416,6 +434,10 @@ return cib = xmlutil.cibdump2elem() + # IMPORTANT: Do NOT call cibdump2elem twice, or you risk a race. + # Really use the same xml as "original" and basis for the changes. + # Thus the "deepcopy" here; see also do_standby(). + orig_cib = copy.deepcopy(cib) for node in node_list: node_id = utils.get_nodeid_from_name(node) for query_path in [constants.XML_NODE_QUERY_STANDBY_PATH, constants.XML_STATUS_QUERY_STANDBY_PATH]: @@ -423,7 +445,6 @@ if item and item[0].get("value") != "off": item[0].set("value", "off") - orig_cib = xmlutil.cibdump2elem() rc = utils.diff_and_patch(xmlutil.xml_tostring(orig_cib), xmlutil.xml_tostring(cib)) if not rc: return False