Problem Statement & Context
The Problem:
When performing system updates (
To prevent this deadlock, the target node must be placed into HA maintenance mode **before** running `apt-get dist-upgrade` (`ha-manager crm-command node-maintenance enable <Node>`). Therefore, using Gemini 3.6 Flash and Antigravity IDE, I developed a script to automate this process.
Give it a spin & feedback welcome!
If you've ever bumped into locked HA processes or simply want a smoother, hassle-free workflow for node updates, feel free to give the script a test run in your lab or cluster!
Feedback, suggestions, or PRs are always appreciated => let me know how it works for you or if you encounter any edge cases:
Happy upgrading!
GitHub: proxmox-cluster-upgrade-script
This prompts the cluster to live-migrate all HA resources to the remaining nodes without downtime. During the upgrade, the node is completely isolated and free of active HA workloads, allowing the package updates to complete cleanly without any blockages.
The Problem:
When performing system updates (
apt-get dist-upgrade) on a Proxmox VE node within an HA cluster, a deadlock can occur during package processing:- Package Hang via Synchronous Triggers: During the update of the `pve-ha-manager` package, `dpkg` executes post-installation scripts that attempt to synchronously reload the local HA service (`pve-ha-lrm`). If dependent systemd services or underlying libraries are updated at the exact same time, `systemd`, `D-Bus`, and `dpkg` can deadlock each other.
- Cascading Lockup of HA Resources: As soon as the local HA manager hangs, running VMs and LXC containers can no longer be gracefully stopped or migrated. Commands like `pct stop` freeze indefinitely in a queue (`Requesting HA stop...`) because the HA subsystem stops responding.
- Tedious Manual Recovery: To recover the node, affected processes must be forcefully killed via `kill -9`, followed by forced node reboots (`reboot -f`).
To prevent this deadlock, the target node must be placed into HA maintenance mode **before** running `apt-get dist-upgrade` (`ha-manager crm-command node-maintenance enable <Node>`). Therefore, using Gemini 3.6 Flash and Antigravity IDE, I developed a script to automate this process.
Give it a spin & feedback welcome!
If you've ever bumped into locked HA processes or simply want a smoother, hassle-free workflow for node updates, feel free to give the script a test run in your lab or cluster!
Feedback, suggestions, or PRs are always appreciated => let me know how it works for you or if you encounter any edge cases:
Happy upgrading!
GitHub: proxmox-cluster-upgrade-script
This prompts the cluster to live-migrate all HA resources to the remaining nodes without downtime. During the upgrade, the node is completely isolated and free of active HA workloads, allowing the package updates to complete cleanly without any blockages.