Repository navigation
Description
What's the problem
A RigForge-only appliance rig (adopted by a Pithead) cannot be updated from the dashboard. The worker-upgrade verb on develop (lib/pithead/46-control-worker-ops.sh, the .appliance == true check) rejects appliance rigs outright, and the dashboard tells the owner to re-flash. Owners of many rigs would have to walk to each one with a USB stick for every release.
This issue is the dashboard half of per-rig remote OS update. It is split from #4016. Update all and Remove rig stay in #4016 for v2.1.0.
The update itself lives on the rig, not here. The rig exposes an update API on its control server (p2pool-starter-stack/rigforge#684). It downloads its own signed bundle over its own on-demand Tor client and installs it (#4013). The dashboard's "Update OS" button is only one client of that API. A rig with no Pithead is updated by a documented API call from any LAN computer using the rig's token, and that path is owned by p2pool-starter-stack/rigforge#684 and #4013, not by this issue. Nothing in this issue may become a requirement for the rig to update.
What it impacts
- Owners of adopted RigForge-only appliance rigs: a per-rig Update OS button replaces "re-flash by USB".
- Rig owners on 2.0.3 who skip 2.0.4 (2.0.4 release notes: tell RigForge-only appliance owners to stay on 2.0.3 #4136): after one manual USB hop to 2.0.5 the rig has the endpoint, and later updates are remote. A disk-installed rig uses Keep everything and stays adopted. A stick rig re-flashes, which means a new token and re-adopt.
- Rigs whose pool host has no IPv4: their control API is off (the rig only enables control when it can pin
api_allow_fromto the coordinator IPv4), so they cannot be updated from here. - DIY (non-appliance) rigs: unchanged. They keep the git Upgrade button.
How I found it
Reading lib/pithead/46-control-worker-ops.sh on develop: the appliance check rejects the rig and points at the OS image. Reading RigForge util/control-server.py on develop: only /apply and /upgrade exist, with no update route. The 2.0.4 workers-page wording (#3961) says to re-flash. The owner ruled on 2026-11-15/16 that remote OS update for RigForge-only appliances moves to v2.0.5, scoped to per-rig update, and that rigs must work independently of Pithead.
How important is it
Medium, a v2.0.5 scope item. It is the only way a rig owner can update from the dashboard instead of re-flashing. It is gated: if the RigForge release carrying the update API is not ready when the rest of 2.0.5 is, 2.0.5 ships for Pithead boxes only, rig owners stay on 2.0.3, and this issue moves with the rig release. It depends on p2pool-starter-stack/rigforge#684 (update API), #4013 (rig updater, PR #4103) and p2pool-starter-stack/rigforge#680 (os_version in the worker feed). The develop backport of the Tor client and hardened update channel (#4040, #4056, #4103 cherry-picked or retargeted onto develop, no forward-merge of develop-v2.1.0) is tracked separately.
Acceptance criteria
- A new control verb, modelled on
control_worker_upgrade, drives one rig's update. The browser request carries only the worker name and an action (check or update). Token, host and port are read from host config only (the sameresolve_worker_targetgate) and never appear in the browser request, the response, the audit log or the status the dashboard shows. - The dashboard route applies the existing
X-Pithead-Controlheader check (dashboard/mining_dashboard/web/server.py, the 403 without the header). A request without the header is refused and no verb file is staged. A test covers this. - The coordinator sends its own version as the ceiling (
coordinator_version) and no URL, host, path or file. Equal versions and downgrades are refused by the rig. A test fixture rig confirms the request body has no field other thantagandcoordinator_version. - Workers page, per adopted appliance rig: shows the rig's OS version. The "Update OS" button appears only when the rig has
os_versionand the coordinator version is newer. - When the rig is already at the coordinator's version, there is no button and the UI says to update Pithead first.
- A rig without
os_versionshows "needs one USB hop to 2.0.5" with the re-flash or Keep everything advice, and no button. This replaces the 2.0.4 wording from Appliance rigs: the coordinator offers a RigForge git upgrade they always refuse, and no doc says how a rig updates #3961. - A rig whose control API is off (pool host has no IPv4) shows "cannot be reached for update" and no button. It is not silently skipped.
- An optional Check action shows the available version, or the rig's refusal reason, without installing.
- Clicking Update OS opens a confirm naming the rig, its current version, the target version, and that the rig reboots and is offline for a few minutes. Cancel sends nothing.
- States shown in order: Downloading over Tor, Verifying, Installing, "Rebooting, offline is expected", then a verdict: Updated to X, Rolled back (with reason), or Refused (equal, downgrade, over ceiling, no space, bad signature, update already running).
- The rebooting state is bounded. The rig being offline inside the bound raises no fault. A rig that has not returned when the bound ends shows "not back: check the rig" and the old-slot fallback note.
- One rig in flight: a second Update OS while one is running shows "update already running" (the rig answers 409, and the host runner allows one dial per drain). No Update all in 2.0.5.
- A DIY rig keeps the git Upgrade button and its existing behavior. The appliance refusal in the git path stays for appliance rigs that have no updater.
- The dashboard makes no update-related request to any rig unless the operator clicks. No timers and no automatic checks.
docs/appliance.mddescribes the flow, the 2.0.3-to-2.0.5 USB hop, the disk-install versus stick difference, and says a rig without a Pithead updates by a direct call to the rig API (linking the RigForge doc).- tier4-e2e: the coordinator calls the update API of a rig VM with its own version as ceiling, the rig installs through the test-base seam, returns on the new slot, and the dashboard shows the verdict. Tokens, hostnames and IPs are absent from the status JSON and the page.
Possible solutions
- Add a
worker-os-updatecontrol verb besideworker-upgradein46-control-worker-ops.sh: resolve the target, check budget, POST/update-checkor/update, expect 202, then pollGET /update/statusover the LAN leg. Surface the rig's own status file as the verdict. The dashboard reads the result file like the other control verbs. - Extend
workerupgrade.mjsfor the button, confirm and state strings. Gate the button onapplianceandos_versionfrom the feed (Broadcast OS version, rig id and display hints in the sister feed (additive) rigforge#680). - Open: how the dashboard knows a rig's control API is off. The feed does not carry it today. Options are a feed field or the dashboard's own check of the rig's pool host.
- Rejected: a Pithead-owned second listener on the rig (duplicate auth, new firewall rule), and coordinator-served bundles (the owner ruled the rig downloads its own bundle over its own Tor client, so the coordinator serves no bundle files).
- Pending sibling, not designed here: a separate rig egress audit will add time sync and DNS. The rule is Tor only for everything except stratum to an external pool the owner configured. This issue adds no rig egress.
Activity
pithead-developer commentedon Nov 16, 2026
Blocked on p2pool-starter-stack/rigforge#684.
Blocked on #4013.
The Update OS button calls the rig's update API (rigforge#684) and drives the rig-side updater (#4013), so it starts when both close.