Repository navigation
fix(node): give maintenance RPCs a timeout longer than node-serviced's - #978
Conversation
In split roles the API relays update_node_api, update_core and update_geofiles to the node worker over NATS RPC with the default node RPC timeout (30 s). The worker waits for node-serviced, which runs the pg-node command for up to 5 minutes, so the API reported an error while the update kept running. These three RPCs now wait 340 s, above node-serviced's deadline and the bridge's own 330 s maintenance timeout.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe three remote node maintenance RPCs now use a shared 340-second timeout. A test verifies that each RPC timeout exceeds the 300-second node-serviced deadline. ChangesNode maintenance RPC timeouts
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The three split-role maintenance calls now have 340 seconds to complete. The reviewed changes establish no actionable merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the timeout clock, Comment |
… to ff6e596 Every Port queue line in the panel and side-repository ledgers now says `security: yes` or `security: no`. Security: c9b445a (passkey client rename), eb50bfd, PasarGuard#938, PasarGuard#940, PasarGuard#942, the cryptography 50.0.2 security release, and the ten commits of upstream's PasarGuard#979 permission-leak batch (user list scopes, API-key permissions, HWID visibility, users.read, the Telegram inline search), which no branch ports yet. Checked with git ls-remote on 2026-10-09: upstream dev moved to ff6e596. The PasarGuard#979 batch, the node RPC fixes (PasarGuard#977, PasarGuard#978), the core-deletion restart (PasarGuard#934), dashboard fixes (PasarGuard#852, PasarGuard#907, PasarGuard#949, PasarGuard#952), performance changes (PasarGuard#945, PasarGuard#853, PasarGuard#855) and the merged dependabot bumps (ruff, uvloop, fastapi) join the queue; the ruff and uvloop conditional waivers ended when upstream merged them. Waived: PasarGuard#980 and its branch commit (the Telegram notifier workflow the fork deleted) and the superseded fastapi dependabot head b021d6f. The refs snapshot records the five new heads. Fork core-kit main 90701408 now contains upstream d2ecb5bd, so that ledger is empty. No side repository gained an upstream commit since 2026-10-07.
…rd#978 and PasarGuard#1085 as ported by their B-NODE cherry-picks and take them off the port queue
Problem
With split roles, the API process relays
update_node_api,update_coreandupdate_geofilesto the node worker over NATS RPC. Those calls used the default node RPC timeout,NATS_NODE_RPC_TIMEOUT, which is 30 s.The worker waits for node-serviced, which runs the
pg-nodecommand for up to 5 minutes (docker pulls, downloads). So the API reported an error while the update kept running.Change
The three maintenance RPCs (
NodeOperation._update_node_api_remote,_update_core_remote,_update_geofiles_remote) passtimeout=340. That is above node-serviced's 5 minute deadline and the bridge's own 330 s maintenance timeout from PasarGuard/node_bridge_py #23.All-in-one deployments don't use this path and are unaffected.
Tests
tests/test_node_maintenance_rpc_timeout.py: the three RPCs pass a timeout above node-serviced's 300 s deadline. It failed before the change (timeout=None).tests/api/test_node.pypasses.ruff checkandruff format --checkare clean.Follow-up
The all-in-one path (the bridge call itself, 10 s by default) is fixed in PasarGuard/node_bridge_py #23. It reaches the panel once that is released and
pasarguard-node-bridgeis bumped here.Summary by CodeRabbit