Skip to content

The worker-rejection stop is never re-asserted #4442

Backlog

Description

@pithead-developer

What's the problem

In the required-down branch of dashboard/mining_dashboard/service/data_gates.py, docker_control.stop is called only while workers_rejected is False (line 134). After the first successful stop the flag is trusted forever.
The sync gate, by contrast, re-stops every cycle while holding.
Related: when _apply_fail_closed_gate clears (:284-285), _start_gate_containers starts the gate containers (default P2Pool and xmrig-proxy, dashboard/mining_dashboard/config/config.py:339-341) with no check of the mining guard.

What it impacts

During a Monero or Tari outage, if xmrig-proxy comes back (a container restart, or pithead up), the dashboard issues no further stop and miners reconnect to a dead stack until the nodes recover.
The pithead up scenario is inferred, not run.

How I found it

Reproduced the "no re-assert" part by calling the real gate on a develop checkout: zero stop calls while still required-down with workers_rejected already True.
A verifier confirmed the guard and the release path by reading. The restart scenario was not run.

Code references are from develop at 32d9834a. Checked for an existing issue: none found (related, different: open #4138 and #4160 are about readmission delay after a recreate).

How important is it

P2-correctness: it can silently defeat the failover hold, but only when something restarts the proxy during an outage.

Acceptance criteria

  • A test sets workers_rejected True, keeps the node down, simulates the proxy running again, and asserts a stop is issued the next cycle. It fails today.
  • Fail-closed release no longer starts xmrig-proxy while the mining guard still holds.

Possible solutions

  • Smallest: call docker_control.stop(container, quiet=True) every cycle while workers_rejected is True, as the sync gate does.
  • For the release path, start only P2Pool and let the readmit path start the proxy.

Activity

  1. added this to the v2.0.5 milestone on Nov 24, 2026
  2. added
    bug
    dashboard
    P2-correctness
    on Nov 24, 2026
  3. added
    operator-hold
    and removed
    operator-hold
    on Nov 24, 2026
  4. pithead-developer commented on Nov 24, 2026

    @pithead-developer
    ContributorAuthor

    Note for the next round on #4480, from the author of its first commit.

    • The current head f382847d adds one commit that changes only the VERSION file (to 2.0.4). CI fails on it in stack block 1, at the check "pyproject.toml version matches VERSION": 2655 passed, 1 failed.
    • The fix itself is the first commit, 70026e7a. It is unchanged and its CI was green.
    • The reviewer's open point is a test run on real hardware on the head. That does not need a version change in this pull request: the version arrives on this branch with the forward merge in Forward-merge 2.0.4 into develop-v2.0.5 and develop-v2.1.0 after the release #4502. Dropping the VERSION commit makes CI green again.
  5. pithead-developer commented on Nov 24, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #4502. PR #4480 fixes the worker-rejection re-assert bug: re-stops the mining proxy when it restarts during an outage, and skips proxy start on fail-closed release when workers are rejected or mining guard is active. All code changes verified, all tier 1-3 CI passes, verifier clean. Blocked on #4502 (forward-merge 2.0.4 into develop-v2.0.5) which prevents tier4-e2e proof. Soak test failure filed as #4506 (unrelated).

    The runner resumes this issue when that one closes.

  6. added
    blocked
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-correctnessblockedbugdashboard

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions