Hi h@rald,
thanks for the detailed report — you hit a genuine design flaw, and your post is what triggered the rewrite that shipped yesterday as
nupst 6.0.0. Taking your three points in order:
1. Why the 5-minute delay wasn't applied: in nupst < 6, defaultShutdownDelay only applied to shutdown-type actions — it's the +5 in shutdown -h +5 on the host itself. Proxmox actions fired
immediately on the online→onBattery transition, with no debounce and no delay. So a 20-second blip really did stop your VMs instantly. Sorry about that — it was bad default behavior, not a misconfiguration on your side.
In nupst >= 6.0.0 actions are driven by explicit conditions instead. "onBattery": { "afterMinutes": 3 } means the battery state must be
sustained for 3 minutes — a short blip does nothing. And a scheduled host shutdown is now actually cancelled (shutdown -c) if power returns during the countdown; previously nothing ever cancelled it.
2. Seeing what nupst is about to do: nupst status now shows the live state of every action, e.g. PENDING (onBattery) - executes in 3m20s unless power returns, plus a banner when a host shutdown is scheduled. There's also a new nupst config explain that renders your config as a plain-language timeline, so you can verify what will happen
before the next outage.
3. Two-stage config (guests first, host after):
JSON:
"actions": [
{
"id": "stop-guests",
"type": "proxmox",
"when": { "onBattery": { "afterMinutes": 3 }, "batteryBelow": 60, "runtimeBelow": 15 },
"proxmoxMode": "auto"
},
{
"id": "halt-host",
"type": "shutdown",
"when": { "batteryBelow": 30, "runtimeBelow": 10 },
"shutdownDelay": 5
}
]
Reading it: a real outage stops the guests at t+3m (or earlier if the battery drains below 60% / 15 min runtime), and the host halts once the battery falls below 30% — everything cancels if power returns first. If you want a visible, abortable countdown before the guests stop, add "delayMinutes": 2 to the proxmox action; it arms, counts down in nupst status, and cancels on power restore or nupst pause.
For your 2-node cluster: run one nupst per node with this config — each node watches the UPS and shuts itself down independently, so there's no coordination problem.
Upgrading: sudo nupst upgrade (or re-run the install script). One thing to know: the migration deliberately preserves your current behavior
exactly — your existing proxmox action becomes "when": { "onBattery": { "afterMinutes": 0 } }, i.e. still instant, and the daemon warns about it at startup. So after upgrading, edit the action to something like the above and run nupst config explain to double-check.