From 16eb09dc225ef34efd90544ae933b4485150a73d Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 9 Oct 2024 00:33:00 -0400 Subject: [PATCH] Fix ordering bug with vm_detail --- daemon-common/vm.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/daemon-common/vm.py b/daemon-common/vm.py index e7cc0c6b..046e7120 100644 --- a/daemon-common/vm.py +++ b/daemon-common/vm.py @@ -3958,6 +3958,9 @@ def vm_worker_create_mirror( # 2. Send snapshot to remote # + # Re-get our side's VM configuration details (since we now have the snapshot) + vm_detail = get_list(zkhandler, limit=dom_uuid, is_fuzzy=False)[1][0] + # Determine if there's a valid shared snapshot to send an incremental diff from if destination_vm_detail: local_snapshots = {s["name"] for s in vm_detail["snapshots"]} @@ -4570,9 +4573,12 @@ def vm_worker_promote_mirror( ) # - # 2. Send snapshot to remote + # 3. Send snapshot to remote # + # Re-get our side's VM configuration details (since we now have the snapshot) + vm_detail = get_list(zkhandler, limit=dom_uuid, is_fuzzy=False)[1][0] + # Determine if there's a valid shared snapshot to send an incremental diff from local_snapshots = {s["name"] for s in vm_detail["snapshots"]} remote_snapshots = {s["name"] for s in destination_vm_detail["snapshots"]} @@ -4922,7 +4928,10 @@ def vm_worker_promote_mirror( ) return False + # # 5. Set mirror state OR remove VM + # + if remove_on_source: current_stage += 1 update(