From 6ac14f832e194faf32d2f3a72ee94a14f0b6d691 Mon Sep 17 00:00:00 2001 From: Josh Patterson Date: Mon, 24 Feb 2025 12:22:52 -0500 Subject: [PATCH] only allow first process step to overwrite last --- salt/soc/dyanno/hypervisor/write_status.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/soc/dyanno/hypervisor/write_status.sls b/salt/soc/dyanno/hypervisor/write_status.sls index 4babf7687..7859069a1 100644 --- a/salt/soc/dyanno/hypervisor/write_status.sls +++ b/salt/soc/dyanno/hypervisor/write_status.sls @@ -64,7 +64,7 @@ ensure_status_dir: {# Some of the status updates trigger within a second of each other can can cause, for example, IP Configuration orchestration to process before the Processing #} {# This check has been put in place to ensure a status sooner in the process can't overwrite this file if a status later in the process wrote to it first. #} {# The final step is Destroyed, so we allow Processing to overwrite that incase someone creates a new VM with same name that was previously destroyed. #} -{% if new_index > current_index or current_index == process_steps | length - 1 %} +{% if new_index > current_index or (current_index == process_steps | length - 1 and new_index == 0) %} write_status_file: file.serialize: - name: {{ status_file }}