Repository navigation
fix(admins-openclaw): tolerate Node event-loop stalls in probes - #101
Conversation
After PR #96 fixed the runtime-mirror lock wedge, a different failure mode surfaced: the bundled-runtime install phase blocks the Node event loop for 3-5s per extension across ~30 extensions during cold start. The previous probe budgets killed the pod mid-install: readiness: timeoutSeconds=3, failureThreshold=3 → 30s tolerance liveness: timeoutSeconds=5, failureThreshold=5 → 150s tolerance admins-openclaw 2026-05-02: container ran for 28 min (WS gateway answered live device.pair / mctl.connect / codex.connect requests), then was SIGKILLed (exitCode 137) when npm-install bursts pushed /healthz past 5s for 5 consecutive probe periods. New budgets: readiness: 10s timeout, threshold 5 → 50s tolerance liveness: 15s timeout, threshold 10 → 300s (5 min) tolerance Trade-off: a truly hung pod takes 5 min instead of 2.5 min to be killed. Acceptable for a single-replica tenant openclaw that doesn't need millisecond-level recovery. Steady-state (post-plugin-install) probes are unchanged in spirit; only the budget is wider.
|
@codex review |
|
@copilot review |
Code Review —
|
| Probe | Before | After | Tolerance |
|---|---|---|---|
| Readiness | timeout=3, threshold=3 |
timeout=10, threshold=5 |
30 s → 50 s |
| Liveness | timeout=5, threshold=5 |
timeout=15, threshold=10 |
150 s → 300 s |
periodSeconds (10 / 30) is unchanged, so wall-clock tolerances match the commit message.
Readiness comment is clear and specific (cites beta.2, exact extension count observation, outcome).
⚠️ Observations / minor notes
-
timeoutSeconds: 15is half ofperiodSeconds: 30for liveness. Each probe attempt may block the kubelet connection for up to 15 s before being counted as a failure. That's acceptable given the trade-off, but it means under sustained stalls the pod will appear slower to kubelet than a non-blocking endpoint would. No action required — just worth keeping in mind if you tuneperiodSecondsdown in the future. -
initialDelaySeconds: 60on liveness doesn't cover the full install window. With 30 extensions at 3–5 s each, install can run 90–150 s, which exceeds the 60 s initial delay. ThefailureThreshold=10/timeout=15budget (300 s of tolerance) does cover it, but any future increase in extension count could erode this. The real fix is making/healthznon-blocking during install (off-thread async check), which would eliminate the need for these wide budgets entirely. -
Rollout template gap (pre-existing, unrelated to this PR).
templates/rollout.yamldoesn't rendertimeoutSecondsorfailureThresholdfor liveness/readiness probes (lines 76–90), so those values would silently fall back to k8s defaults (1 s/3) for any Argo Rollout-based deployment. Not introduced by this PR —strategy.type: Recreatemeans this service uses the Deployment template — but worth a follow-up issue.
Verdict
The change is correct and safe for the declared constraints (single-replica tenant, no ms-level recovery requirement). The trade-off (5 min kill time for a truly hung pod) is explicitly documented in both the commit message and inline comments. No blockers.
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Pre-PR before bumping labs/ovk to 2026.5.2-mctl.1. Copilot review on the direct labs bump PR #115 surfaced that admins-specific workarounds were never applied to labs/ovk: - PR #96 lock-scrub entrypoint wrapper (top-level command/args) - PR #96 restore-state lock cleanup (find ... *.lock -exec rm) - PR #101 widened probe budgets (startup 455s, readiness 5x, liveness 5min) - PR #102/#103 bonjour disable (in JSON config) - plugin-runtime-deps S3 purge (perf + restore time) Without these, bumping labs/ovk to 2026.5.2-mctl.1 would re-introduce the lock-wedge and probe-kill failure modes that admins survived only because the workarounds were in place. Tenant-specific differences (CPU limits, OAuth callback URLs, env vars, MCP server registrations) are intentionally NOT touched — only durability/safety patches copied over with paths adapted per tenant ('labs' vs 'ovk' in S3 prefixes). Both files now +38 lines each. Closed PR #115 (labs image bump) — will re-open after this merges.
Summary
Trade-off
A truly hung pod takes 5 min instead of 2.5 min to be killed. Acceptable for single-replica tenant openclaw where ms-level recovery isn't needed.
Test plan