Skip to content

Commit

Permalink
1299: prevent_traceback_on_online_and_standby
Browse files Browse the repository at this point in the history
- pull 1299 from clusterlabs/crmsh
  • Loading branch information
freishutz committed Feb 8, 2024
1 parent b95d3df commit 19d5796
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crmsh/ui_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ def do_standby(self, context, *args):
xml_query_path_oppsite = constants.XML_NODE_QUERY_STANDBY_PATH

cib = xmlutil.cibdump2elem()
if cib is None:
return False
# IMPORTANT:
# Do NOT call cibdump2elem twice, or you risk a race where the
# resulting diff will contain more changes than the values for
Expand Down Expand Up @@ -431,6 +433,8 @@ def do_online(self, context, *args):
return

cib = xmlutil.cibdump2elem()
if cib is None:
return False
# 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().
Expand Down

0 comments on commit 19d5796

Please sign in to comment.