fixed HA VM timeout during mm

This commit is contained in:
2026-07-26 22:01:55 -05:00
parent dcccb8d837
commit 8c73cb7a53
3 changed files with 45 additions and 5 deletions
+13 -4
View File
@@ -455,6 +455,9 @@ wait_for_ha_evacuation() {
local -a ha_ids
local -a remaining
local guest
local guest_status
local guest_type
local guest_vmid
local ha_id
log "Waiting for HA-managed guests to leave ${LOCAL_NODE}."
@@ -471,8 +474,10 @@ wait_for_ha_evacuation() {
remaining=()
for guest in "${local_guests[@]}"; do
IFS=$'\x1f' read -r guest_vmid guest_type guest_status _ <<< "$guest"
[[ "$guest_status" == "running" ]] || continue
for ha_id in "${ha_ids[@]}"; do
if [[ "${guest%%$'\x1f'*}" == "$ha_id" ]]; then
if [[ "$guest_vmid" == "$ha_id" ]]; then
remaining+=("$guest")
break
fi
@@ -842,9 +847,13 @@ main() {
policy_nodes policy_strict policy_rule destination route_note <<< "$guest"
if guest_is_ha_managed "$vmid"; then
warn "${guest_type} ${vmid} became HA-managed; TAPM will not migrate it manually."
migration_skipped+=("$guest")
continue
status="$(guest_status "$vmid" "$guest_type")"
if [[ "$status" != "stopped" ]]; then
warn "${guest_type} ${vmid} is HA-managed and is not confirmed stopped; TAPM will not migrate it manually."
migration_skipped+=("$guest")
continue
fi
log "${guest_type} ${vmid} is HA-managed but stopped; continuing with offline migration."
fi
if ! choose_destination "$required_storages" "$policy_nodes" "$policy_strict"; then