[Bug] rolling updates trying to restart again after it has already restarted?
Hey there! ๐ Thanks for taking the time to report this bug โ we appreciate it!
Please keep in mind: PegaProx is developed and maintained entirely by volunteers in our free time. We do our best, but we can't work magic ๐ช โ please be patient, we'll get to your issue as soon as we can.
Want to help keep PegaProx alive?
- โญ Star the project โ it's free and helps a lot!
- ๐ Become a Sponsor โ helps us dedicate more time to development
- ๐ค Contributing code or docs is always welcome too!
Describe the bug
when i run a rolling update, its doing as it should, entering maintaince mode, checking for updates then updating packages, then rebooting, then exiting maintaince mode, but if you see from the logs below, its restarting but then its trying to restart again because it thinks it needs to restart but it already restarted after wait_online and before it said updates successful!
but also im sure the logs are wrong and it should be saying its rebooting after its done updates which it doesnt
Steps to Reproduce
- run a rolling update on a cluster
Expected behavior
to run the steps one by one without issues not run commands then try running them again?
Environment
- PegaProx Version: 1.2.0
- Installation Method: ANY
- OS: Ubuntu 24.04
- Browser: Firefox
- Behind Reverse Proxy? No
- UI? Corporate
Logs
[16:40:00] Rolling update started
[16:40:00] Settings: skip_up_to_date=True, skip_evacuation=False, evacuation_timeout=1800s, reboot_timeout=600s, allow_local_disks=False, ceph_health_gate=degraded
[16:40:00] Cluster state: 5/5 nodes online ยท quorum HELD
[16:40:01] Ceph: โ HEALTH_OK ยท 5/5 OSDs up ยท 33 active+clean
[16:40:01] === Processing blade1 (1/5) ===
[16:40:01] Checking for available updates on blade1...
[16:40:10] Found 83 updates available on blade1
[16:40:10] blade1: 0 guests present (0 running, 0 stopped)
[16:40:10] Enabling maintenance mode on blade1
[16:40:10] โ Ceph (if present): noout + norebalance will be set on blade1 to prevent rebalancing
[16:40:14] Waiting for VM evacuation (timeout: 1800s)...
[16:40:44] Evacuating: 2/2 VMs (30s)
[16:41:09] โ Evacuation completed - all VMs migrated
[16:41:09] Installing updates on blade1
[16:41:09] Waiting for update task (timeout: 900s)...
[16:41:09] Update phase: init
[16:41:19] Update phase: apt_dist_upgrade
[16:44:29] Update phase: wait_online
[16:50:00] โ Updates installed
[16:50:00] Node blade1 requires a reboot โ rebooting (timeout: 600s)...
[16:52:00] โ ๏ธ blade1 did not go offline within 120s
[16:52:00] Waiting for blade1 to come back online...
[16:52:00] โ blade1 back online (0s)
[16:52:10] Disabling maintenance mode on blade1
[16:52:40] โ blade1 maintenance exit failed (will retry at end of run)
[16:52:40] โ Ceph (if present): noout + norebalance cleared for blade1
[16:52:41] Ceph after blade1: โ HEALTH_OK ยท 5/5 OSDs up
[16:52:41] โ blade1 updated successfully
Screenshots
Checklist
- [x] I have searched existing issues to make sure this is not a duplicate
- [x] I am using the latest version of PegaProx
- [x] I've put enough in here that someone can start on it without asking me three questions first
- [x] I understand PegaProx is maintained by volunteers in their free time. Nobody is on call, and writing URGENT doesn't get anyone out of bed ๐ช
i believe i might of found the issue
[2026-09-26 16:40:00,490] [PegaProx_MyLocal] INFO: [NodeIP] blade1 -> 192.168.88.11 (cluster/status, reachable on :22)
[2026-09-26 16:40:10,313] [PegaProx_MyLocal] INFO: [MAINT] Entering maintenance mode for node: blade1
[2026-09-26 16:40:10,461] [PegaProx_MyLocal] INFO: [NodeIP] blade1 -> 192.168.88.11 (cluster/status, reachable on :22)
[2026-09-26 16:40:10,539] [PegaProx_MyLocal] INFO: [NodeIP] blade1 -> 192.168.88.11 (cluster/status, reachable on :22)
[2026-09-26 16:40:12,514] [PegaProx_MyLocal] INFO: [MAINT] Ceph flags set for blade1 (norebalance + noout)
[2026-09-26 16:40:12,587] [PegaProx_MyLocal] INFO: [NodeIP] blade1 -> 192.168.88.11 (cluster/status, reachable on :22)
[2026-09-26 16:40:12,605] [PegaProx_MyLocal] INFO: [MAINT] Trying native HA for blade1 (user=root)
[2026-09-26 16:40:12,606] [PegaProx_MyLocal] INFO: [HA] Trying SSH with configured key...
[2026-09-26 16:40:12,606] [PegaProx_MyLocal] INFO: [HA] Running: ssh [email protected] 'ha-manager crm-command node-maintenance enable blade1'
[2026-09-26 16:40:14,434] [PegaProx_MyLocal] INFO: [HA] โ Command successful:
[2026-09-26 16:40:14,435] [PegaProx_MyLocal] INFO: [MAINT] native HA flag set for blade1
[2026-09-26 16:40:14,435] [PegaProx_MyLocal] INFO: [MAINT] HA flag set for blade1, now evacuating VMs ourselves
[2026-09-26 16:40:14,695] [PegaProx_MyLocal] INFO: [PKG] Found 2 VMs to evacuate from blade1
[2026-09-26 16:40:14,703] [PegaProx_MyLocal] INFO: [SYNC] Evacuating netbootxyz (VMID: 102) to blade2
[2026-09-26 16:40:14,704] [PegaProx_MyLocal] INFO: migrating netbootxyz (102) blade1 -> blade2
[2026-09-26 16:40:14,754] [PegaProx_MyLocal] INFO: [OK] Migration initiated for netbootxyz to blade2 (Task: UPID:blade1:0009A64C:079F251B:6AB7E75E:hamigrate:102:root@pam!pegaprox_539419:)
[2026-09-26 16:40:16,798] [PegaProx_MyLocal] INFO: [OK] Successfully migrated netbootxyz to blade2
[2026-09-26 16:40:16,799] [PegaProx_MyLocal] INFO: [OK] Evacuated netbootxyz to blade2 (1/2)
[2026-09-26 16:40:16,813] [PegaProx_MyLocal] INFO: [SYNC] Evacuating librenms (VMID: 100) to blade2
[2026-09-26 16:40:16,829] [PegaProx_MyLocal] INFO: migrating librenms (100) blade1 -> blade2
[2026-09-26 16:40:16,874] [PegaProx_MyLocal] INFO: [OK] Migration initiated for librenms to blade2 (Task: UPID:blade1:0009A656:079F25EF:6AB7E760:hamigrate:100:root@pam!pegaprox_539419:)
[2026-09-26 16:40:19,045] [PegaProx_MyLocal] INFO: [OK] Successfully migrated librenms to blade2
[2026-09-26 16:40:19,046] [PegaProx_MyLocal] INFO: [OK] Evacuated librenms to blade2 (2/2)
[2026-09-26 16:40:19,060] [PegaProx_MyLocal] INFO: [MAINT] 2 VMs still on blade1 after evacuation loop, waiting...
[2026-09-26 16:40:22,116] [PegaProx_MyLocal] INFO: [MAINT] HA poll (manager_status): nodes in native maintenance: blade1
[2026-09-26 16:41:09,368] [PegaProx_MyLocal] INFO: [OK] All VMs cleared from blade1 after 50s
[2026-09-26 16:41:09,369] [PegaProx_MyLocal] INFO: [OK] Maintenance mode ready for blade1 - all VMs evacuated
[2026-09-26 16:41:09,743] [PegaProx_MyLocal] INFO: [SYNC] Starting update for node: blade1 (reboot: True, force: False)
[2026-09-26 16:41:09,760] [PegaProx_MyLocal] INFO: [SYNC] Update spawned with gevent greenlet
[2026-09-26 16:41:10,039] [PegaProx_MyLocal] INFO: [NodeIP] blade1 -> 192.168.88.11 (cluster/status, reachable on :22)
[2026-09-26 16:41:10,041] [PegaProx_MyLocal] INFO: Connecting to 192.168.88.11:22 as root...
[2026-09-26 16:41:10,146] [PegaProx_MyLocal] INFO: SSH connected to 192.168.88.11
[2026-09-26 16:41:10,591] [PegaProx_MyLocal] INFO: Executing: DEBIAN_FRONTEND=noninteractive apt-get update
[2026-09-26 16:41:12,797] [PegaProx_MyLocal] INFO: Executing: DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
[2026-09-26 16:44:14,861] [PegaProx_MyLocal] INFO: [NodeIP] blade3 is the local node, using 192.168.88.13
[2026-09-26 16:44:14,960] [PegaProx_MyLocal] INFO: [NodeIP] blade2 -> 192.168.88.12 (cluster/status, reachable on :22)
[2026-09-26 16:44:14,970] [PegaProx_MyLocal] INFO: [NodeIP] blade1 -> 192.168.88.11 (cluster/status, reachable on :22)
[2026-09-26 16:44:16,371] [PegaProx_MyLocal] INFO: Executing: apt-get autoremove -y
[2026-09-26 16:44:25,514] [PegaProx_MyLocal] INFO: Executing: apt-get autoclean
[2026-09-26 16:44:25,994] [PegaProx_MyLocal] INFO: Connecting to 192.168.88.11:22 as root...
[2026-09-26 16:44:26,099] [PegaProx_MyLocal] INFO: SSH connected to 192.168.88.11
[2026-09-26 16:44:26,135] [PegaProx_MyLocal] INFO: Validate if package needrestart is installed on node: blade1
[2026-09-26 16:44:26,136] [PegaProx_MyLocal] INFO: Executing: dpkg -s needrestart
[2026-09-26 16:44:26,220] [PegaProx_MyLocal] INFO: Package needrestart is not installed on node: blade1 - forcing to reboot!
[2026-09-26 16:44:26,220] [PegaProx_MyLocal] INFO: Sending reboot command to blade1 (root=True)
Socket exception: Connection reset by peer (104)
[2026-09-26 16:44:29,418] [PegaProx_MyLocal] INFO: Waiting for blade1 to come back online (timeout: 600s)...
[2026-09-26 16:44:51,350] [PegaProx_MyLocal] WARNING: [NODE] cluster 'MyLocal' node 'blade1' blocked for 60s after 3 consecutive failures
...
...
[2026-09-26 16:49:48,967] [PegaProx_MyLocal] INFO: [NODE] cluster 'MyLocal' observed 'blade1' back online via /nodes aggregate โ clearing breaker
[2026-09-26 16:49:48,968] [PegaProx_MyLocal] INFO: [NODE] cluster 'MyLocal' node 'blade1' recovered after 5 failures
[2026-09-26 16:49:53,259] [PegaProx_MyLocal] INFO: Resolved proxmox.hestor.local โ 192.168.88.11 (caching IP)
[2026-09-26 16:49:53,260] [PegaProx_MyLocal] INFO: Connected to Proxmox at proxmox.hestor.local using API Token
[2026-09-26 16:49:53,351] [PegaProx_MyLocal] INFO: [OK] blade1 is back online!
[2026-09-26 16:49:53,361] [PegaProx_MyLocal] INFO: [NodeIP] blade1 is the local node, using 192.168.88.11
[2026-09-26 16:49:53,442] [PegaProx_MyLocal] INFO: [NodeIP] blade5 -> 192.168.88.15 (cluster/status, reachable on :22)
[2026-09-26 16:49:53,510] [PegaProx_MyLocal] INFO: [NodeIP] blade4 -> 192.168.88.14 (cluster/status, reachable on :22)
[2026-09-26 16:49:53,577] [PegaProx_MyLocal] INFO: [NodeIP] blade3 -> 192.168.88.13 (cluster/status, reachable on :22)
[2026-09-26 16:49:53,736] [PegaProx_MyLocal] INFO: [NodeIP] blade2 -> 192.168.88.12 (cluster/status, reachable on :22)
[2026-09-26 16:49:53,738] [PegaProx_MyLocal] INFO: [HA] Trying SSH with configured key...
[2026-09-26 16:49:53,738] [PegaProx_MyLocal] INFO: [HA] Running: ssh [email protected] 'ha-manager crm-command node-maintenance disable blade1'
[2026-09-26 16:49:56,287] [PegaProx_MyLocal] INFO: [HA] โ Command successful:
[2026-09-26 16:49:56,287] [PegaProx_MyLocal] INFO: [MAINT] disabled native HA maintenance for blade1 (via 192.168.88.11)
[2026-09-26 16:49:56,355] [PegaProx_MyLocal] INFO: [OK] Exited maintenance mode for blade1
[2026-09-26 16:49:56,371] [PegaProx_MyLocal] INFO: [NodeIP] blade1 is the local node, using 192.168.88.11
[2026-09-26 16:49:58,871] [PegaProx_MyLocal] INFO: [MAINT] Detected native HA maintenance on blade1 (set externally)
[2026-09-26 16:49:59,185] [PegaProx_MyLocal] INFO: [MAINT] Ceph flags cleared for blade1
Sep 26 16:49:59 [2026-09-26 16:49:59,186] [PegaProx_MyLocal] INFO: [OK] Node update completed for blade1
Sep 26 16:49:59 [NodeWatch] Node blade1 recovered on cluster 2b26455c (severity=info)
[2026-09-26 16:50:14,979] [PegaProx_MyLocal] INFO: [MAINT] HA poll (manager_status): no nodes in native maintenance
[2026-09-26 16:50:14,980] [PegaProx_MyLocal] INFO: [MAINT] blade1 left native HA maintenance
[2026-09-26 16:50:29,188] [PegaProx_MyLocal] INFO: [SYNC] cleared finished update state for blade1
the starting update show Reboot: true so it forces a reboot because a package wasnt installed!?
the package needrestart is NOT installed by default on ANY proxmox setups
so it appears i didnt understand the logs but the is also redundant logs in there too
it rebooted between [16:44:29] Update phase: wait_online and [16:50:00] โ Updates installed
but then decided it wants to wait for another reboot to happen Node blade1 requires a reboot โ rebooting
but it never does a 2nd reboot cuz it only needs 1 reboot!
so all these steps are redunant and shouldnt be there
[16:50:00] Node blade1 requires a reboot โ rebooting (timeout: 600s)...
[16:52:00] โ ๏ธ blade1 did not go offline within 120s
[16:52:00] Waiting for blade1 to come back online...
[16:52:00] โ blade1 back online (0s)
Good catch, and the log tells the whole story. You're right that something runs twice, though it's the waiting rather than the reboot โ no second reboot command goes out.
What happens: the update task itself issues the reboot and then waits for the node to come back (phase: wait_online at 16:44:29, node back by 16:50:00), and only reports completed after that. The rolling-update loop then reads reboot_issued off the finished task, logs "requires a reboot โ rebooting", and starts its own wait-for-offline โ for a reboot that finished five minutes earlier. Hence the 120s of nothing, the โ ๏ธ, and the giveaway back online (0s).
#715 taught that loop to skip the wait when a node needs no reboot. It never learned the other case: the reboot already happened inside the task. So the flag says "a reboot was issued" and the loop reads it as "a reboot is about to happen".
And your second instinct is right too โ the ordering in the log is genuinely misleading. It prints "โ Updates installed" and then "rebooting", while the actual reboot sat between apt_dist_upgrade and wait_online, before that line. So the log describes a sequence that didn't happen in that order.
Costs you 2 minutes and a scary warning per node, so on your 5 blades that's ~10 minutes of phantom waiting. Taking this one.
(The maintenance exit failed (will retry at end of run) at the end is a separate thing โ noted, not forgetting it.)
Marcus
@mkellermann97 thank you for confirming my findings and whats wrong! i plan to expand my cluster too as i have a c7000 blade system so i can go up to 8 nodes! so indeed the waiting period just keeps extending time wise anyways look forward to the fixes, as i tried myself but my AI was going round and round in circles and couldnt follow the pattern of the logs to what functions got called etc!
@mkellermann97 one more discovery too i found. if you check the console logs (not web ui logs)
[2026-09-26 16:44:26,220] [PegaProx_MyLocal] INFO: Sending reboot command to blade1 (root=True)
Socket exception: Connection reset by peer (104)
[2026-09-26 16:44:29,418] [PegaProx_MyLocal] INFO: Waiting for blade1 to come back online (timeout: 600s)...
the is missing logs in between
i never see Reboot output or Reboot command sent or Skipping reboot for node or Reboot command sent (connection closed as expected)
so in my eyes task.reboot_issued is NEVER SET and the ssh didnt close promply and become None
Dug into that and I think the flag is actually set โ but you've turned up something real next to it, so bear with me.
Two of those four strings can't ever appear in the console log: Reboot output: and Reboot command sent / Reboot-Befehl gesendet both go through task.add_output(), which appends to the task's own buffer for the web UI and never touches the logger. So their absence from the console tells us nothing either way.
The other two are logger calls, and their absence is the useful part: Skipping reboot for node missing means the needrestart branch decided a reboot WAS needed, and Reboot command sent (connection closed as expected) missing means no exception escaped. Both of those together say the happy path ran to the end โ which is where task.reboot_issued = True sits. Your timestamps back it up: 16:44:26 โ 16:44:29 is exactly the time.sleep(3) after exec_command, so everything between them ran, just quietly. The Socket exception: Connection reset by peer (104) is paramiko's own transport noise from the box going down under it.
But: reboot_issued is never initialised on the task object โ UpdateTask.__init__ doesn't set it โ and the rolling-update loop reads it as getattr(update_task, 'reboot_issued', True). Defaulting to True. So any path that returns or raises before the reboot block leaves the attribute absent and the loop assumes a reboot happened. That's a fail-open default on a wait-decision, and it makes #715's skip-path fragile in a way that isn't obvious from reading either file alone. Worth fixing while I'm in there.
The phantom 120s wait itself still has the cause from this morning โ the task already waited for the node to come back before reporting completed, so the loop's offline-wait is looking for something that finished minutes earlier. Both things get sorted together.
Marcus
@mkellermann97 thank you for confirming things and explaining it better! as i said i tried with my AI to fix it but i gave up cuz it was going in circles! look forward to the fixes to test! (i use the Testing Branch 24/7, i live dangerously haha)
Ha, someone running Testing 24/7 is worth more to us than most test suites โ I'll give you a shout here once it's on the branch so you can throw a real rolling update at it.
โ MK
@mkellermann97 @MrMasterbay just letting you know the latest Testing (pulled 5 mins ago) has fixed this issue now
[16:08:32] Update phase: apt_dist_upgrade
[16:09:22] Update phase: wait_online (reboot sent)
[16:14:56] โ Updates installed
[16:14:56] โ blade1 rebooted during the update and is back online
[16:14:56] Disabling maintenance mode on blade1
[16:15:26] โ blade1 maintenance exit failed (will retry at end of run)
[16:15:26] โ Ceph (if present): noout + norebalance cleared for blade1
only issue left is its STILL saying the maintenance exit failed,
~~but it not actually failing as its actually already out of maintenance mode AFTER you reboot the server because you put it in maintenance mode BEFORE you restarted it~~
https://pve.proxmox.com/wiki/High_Availability#ha_manager_node_maintenance
~~The manual maintenance mode is not automatically deleted on node reboot, BUT only if it is either manually deactivated using the ha-manager CLI or if the manager-status is manually cleared.~~
ignore comment i mis-read the docs
edit2: just noticed the maintenance exit failed only appears on the FIRST node it picked to do a rolling update?
the other 4 node dont have this warning?
[16:09:22] Update phase: wait_online (reboot sent)
[16:14:56] โ Updates installed
[16:14:56] โ blade1 rebooted during the update and is back online
[16:14:56] Disabling maintenance mode on blade1
[16:15:26] โ blade1 maintenance exit failed (will retry at end of run)
[16:15:26] โ Ceph (if present): noout + norebalance cleared for blade1
...
[16:18:40] Update phase: wait_online (reboot sent)
[16:24:02] โ Updates installed
[16:24:02] โ blade2 rebooted during the update and is back online
[16:24:02] Disabling maintenance mode on blade2
[16:24:02] โ Ceph (if present): noout + norebalance cleared for blade2
...
[16:28:06] Update phase: wait_online (reboot sent)
[16:33:07] โ Updates installed
[16:33:07] โ blade5 rebooted during the update and is back online
[16:33:07] Disabling maintenance mode on blade5
[16:33:07] โ Ceph (if present): noout + norebalance cleared for blade5
...
[16:36:25] Update phase: wait_online (reboot sent)
[16:41:45] โ Updates installed
[16:41:45] โ blade3 rebooted during the update and is back online
[16:41:45] Disabling maintenance mode on blade3
[16:42:15] โ blade3 maintenance exit failed (will retry at end of run)
[16:42:15] โ Ceph (if present): noout + norebalance cleared for blade3
EDIT3: spoke to soon, blade 3 later on failed maintenance exit yet it was successful (either by itself or running the command)
Hi, when a lock occurs disabeling maintenance doesn't work instantly. [16:42:15] โ blade3 maintenance exit failed (will retry at end of run)
Shows that it was then just set out of maintenance at the end of the "script" then.
As promised, a shout: the false "maintenance exit failed" is fixed on Testing. The update task takes the node out of maintenance itself once it's back, so by the time the rolling run tried the same after its 30s wait there was nothing left to do, and that got logged as a failure. Now a failed exit checks whether the node is really still in maintenance, and only then warns and retries at the end of the run.
On your next roll-out on Testing, blade1 should go straight from "Disabling maintenance mode" to the Ceph line.
MK
This is in 1.5.0: a rolling update no longer reports a failed maintenance exit for a node it already took out. Out today, so closing. Thanks for sticking with this one.