Skip to content

Commit

Permalink
Merge pull request #1299 from freishutz/fix_traceback_on_standby
Browse files Browse the repository at this point in the history
Fix: ui_node: prevent traceback on node standby
  • Loading branch information
liangxin1300 authored Mar 4, 2024
2 parents 17fd341 + 72f6851 commit 94b4c39
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 @@ -375,6 +375,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 @@ -433,6 +435,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 94b4c39

Please sign in to comment.