Handle exceptions in fence migrations

This commit is contained in:
Joshua Boniface 2023-09-16 22:56:09 -04:00
parent 86115b2928
commit 457b7bed3d
1 changed files with 7 additions and 1 deletions

View File

@ -153,7 +153,13 @@ def migrateFromFencedNode(zkhandler, node_name, config, logger):
# Loop through the VMs # Loop through the VMs
for dom_uuid in dead_node_running_domains: for dom_uuid in dead_node_running_domains:
fence_migrate_vm(dom_uuid) try:
fence_migrate_vm(dom_uuid)
except Exception as e:
logger.out(
f"Failed to migrate VM {dom_uuid}, continuing: {e}",
state="w",
)
# Set node in flushed state for easy remigrating when it comes back # Set node in flushed state for easy remigrating when it comes back
zkhandler.write([(("node.state.domain", node_name), "flushed")]) zkhandler.write([(("node.state.domain", node_name), "flushed")])