Repository navigation
Description
What's the problem
After a stack recreate the dashboard's worker rejection can stop xmrig-proxy and leave it stopped for minutes after every service is healthy (pithead#4138, e2e job 936: at least 4.6 min stopped with no visible trigger). This is the root-cause fix split out of #4138 by the owner's 2026-11-16 scope review, as specced on #4160. The readmission path is DataGateMixin._apply_worker_rejection (dashboard/mining_dashboard/service/data_gates.py:86), gated on MiningGuard.holding (dashboard/mining_dashboard/service/health/mining_guard.py:151). The exact holding trigger on the reproduction is not yet named — that triage comes first — but three code shapes there can each hold readmission for minutes after the last visible fault clears.
What it impacts
Owners whose stack restarts (apply, upgrade, reboot, Restart all): mining can stay stopped while everything looks healthy, and the UI shows no reason — MiningGuard.pause reports only active triggers while holding stays true from hidden state.
How I found it
Split of the group #4160/#4076/#3911 handed to a local session that found the combined scope too large for one session; this chunk carries #4160 alone. Candidate code shapes were read off develop 67504c5; the holding trigger itself is not yet observed on a reproduction (the #4165 logging slice, PR #4169, exists to name it).
How important is it
P1 user-facing (carried from #4160): the default apply/upgrade path idles the fleet's miner with no cause shown.
Acceptance criteria
- Readmission: after
apply, Restart all, a per-service restart of monerod, p2pool or tor, and a reboot, xmrig-proxy runs again withinNODE_RECOVERY_AFTER_SECplus one poll interval of the last trigger clearing. A test proves each case, including p2pool opening stratum late. - Start period: whether a guarded container still in its healthcheck start period (health
starting) counts as a fault is decided and documented (docs/dashboard.md). - Persisted state: a persisted
workers_rejectedstate (restored in dashboard/mining_dashboard/service/data_setup.py:277) cannot keep xmrig-proxy stopped once no trigger holds. - Every new test is red without the fix; docs describing the guard's stop/readmission behaviour are corrected, not appended.
Possible solutions
- Land or first read PR Dashboard: log why xmrig-proxy was stopped and when it was readmitted (#4165) #4169 (Dashboard: log why xmrig-proxy was stopped and when it was readmitted, and carry both lines in the support bundle #4165, open): it logs the stop reason and the readmission with elapsed time in these same two files — it is the triage this issue asks for, and your edit must sit on top of it.
- Candidate causes to triage, from the code: (a) a trigger key that disappears from the triggers dict while holding lingers in
MiningGuardforUNKNOWN_AFTER_SEC= 600 s (mining_guard.py:125-130), andp2pool_triggersreturns{}for a p2pool reading withoutuptime(mining_guard.py:38) — exactly the shape right after a recreate, givingholdingtrue with no active trigger and no visible reason; consider re-evaluating readmission from live state on every poll. (b)container_triggerscounts healthstartingas a fault (mining_guard.py:85-86), so after a recreate every guarded container faults for its whole start period. (c) the persistedworkers_rejectedlatch itself. - Tests: tier-1 pytest for the guard and gate logic (dashboard/tests/service/health/, dashboard/tests/service/test_data_service_worker_rejection.py) plus a tests/integration row, run by tier4-e2e, that reproduces the recreate trigger and asserts xmrig-proxy running again within the bound; show it red before, green after.
Parent: #4160
Worker brief: Test tier: tier4-e2e (the restart/fault coverage), with tier-1 pytest rows for MiningGuard and _apply_worker_rejection that are red without the fix.
Objective: make xmrig-proxy readmission happen within NODE_RECOVERY_AFTER_SEC plus one poll interval of the last trigger clearing, after apply, Restart all, a per-service restart of monerod/p2pool/tor, and a reboot — one test per case, including p2pool opening stratum late. Also decide and document whether health starting (inside a container's healthcheck start period) counts as a guard fault, and prove a persisted workers_rejected cannot keep the proxy stopped once no trigger holds.
Start by checking PR #4169 (#4165, open at split time): it adds the stop-reason and readmission logging to the same two files (data_gates.py, mining_guard.py). If it has merged, build on current develop; if not, read its diff and keep compatible. Triage the holding trigger with that logging on a reproduction before fixing; the candidate causes are written into the issue body (vanished-key retention for 600 s, starting counted as a fault, the persisted latch).
Register any new integration row where CI runs it; never source it. Update docs/dashboard.md for the decided behaviour. No comments in code. The PR body carries Closes #4160 on a line of its own plus its own child issue's closing keyword, and quotes tiers 1-3 plus the tier4-e2e job on the final head with the unedited bench-ci evidence block.
Activity
dashboard: fix #4191 review round — name the dropped-reading trade an…
pithead-developer commentedon Nov 19, 2026
Waiting on a transient bench_outage condition, not on another issue. the runner could not read the bench to confirm that no job still runs on the PR head (the fleet listing is incomplete; a peer could not be read). The runner re-checks it (first at 2026-11-19T22:40Z, at most 5 times).
pithead-developer commentedon Nov 20, 2026
Waiting on a transient bench_outage condition, not on another issue. the runner could not read the bench to confirm that no job still runs on the PR head (the fleet listing is incomplete; a peer could not be read). The runner re-checks it (first at 2026-11-20T01:37Z, at most 5 times).
pithead-developer commentedon Nov 20, 2026
Waiting on a transient bench_outage condition, not on another issue. the runner could not read the bench to confirm that no job still runs on the PR head (the fleet listing is incomplete; a peer could not be read). The runner re-checks it (first at 2026-11-20T02:06Z, at most 5 times).
pithead-developer commentedon Nov 20, 2026
Waiting on a transient bench_outage condition, not on another issue. the runner could not read the bench to confirm that no job still runs on the PR head (the fleet listing is incomplete; a peer could not be read). The runner re-checks it (first at 2026-11-20T04:42Z, at most 5 times).
pithead-developer commentedon Nov 20, 2026
Waiting on a transient bench_outage condition, not on another issue. the runner could not read the bench to confirm that no job still runs on the PR head (the fleet listing is incomplete; a peer could not be read). The runner re-checks it (first at 2026-11-20T06:37Z, at most 5 times).
pithead-developer commentedon Nov 20, 2026
Merged in #4256.
dashboard: fix #4191 — xmrig-proxy readmitted within the recovery win…