mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +01:00
update annotation after failed vm removal from VMs file
This commit is contained in:
@@ -1176,6 +1176,14 @@ def process_hypervisor(hypervisor_path: str) -> None:
|
|||||||
if os.path.exists(status_file):
|
if os.path.exists(status_file):
|
||||||
os.remove(status_file)
|
os.remove(status_file)
|
||||||
log.info(f"Removed .status file for unconfigured VM: {vm_name}")
|
log.info(f"Removed .status file for unconfigured VM: {vm_name}")
|
||||||
|
|
||||||
|
# Trigger hypervisor annotation update to reflect the removal
|
||||||
|
try:
|
||||||
|
log.info(f"Triggering hypervisor annotation update after removing failed VM: {vm_name}")
|
||||||
|
runner.cmd('state.orch', ['orch.dyanno_hypervisor'])
|
||||||
|
except Exception as e:
|
||||||
|
log.error(f"Failed to trigger hypervisor annotation update for {vm_name}: {str(e)}")
|
||||||
|
|
||||||
continue
|
continue
|
||||||
log.info(f"Initiating deletion process for VM: {vm_name}")
|
log.info(f"Initiating deletion process for VM: {vm_name}")
|
||||||
process_vm_deletion(hypervisor_path, vm_name)
|
process_vm_deletion(hypervisor_path, vm_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user