Repository navigation
Description
What's the problem
The OS provision phase's migration leg fails at "the existing old dashboard snapshot could not be seeded and independently verified" whenever its old image is built from develop after #4260.
migration_seed_old in tests/os/migration-recovery.sh stops the old dashboard and runs the old image's own writer in a bare container:
podman run --rm -i --network none --volumes-from dashboard --user 1000:1000 --entrypoint python3 '$image' -
That container gets no environment. The writer (tests/os/migration-release-snapshot.py) imports mining_dashboard.config.config, and since #4260 that module raises at import when TOR_SOCKS_PROXY is empty or unset:
RuntimeError: TOR_SOCKS_PROXY is empty or unset; outbound is Tor only (#4146)
The dashboard image does not set TOR_SOCKS_PROXY; only compose and the quadlet units do. So the writer dies about a second after it starts. The readiness poll just before it passes, because it uses podman exec dashboard, which inherits the running container's environment.
The step's stderr is also not kept: neither the phase output nor the collected artifacts hold any error text for the step, only the failed row.
What it impacts
- Every provision run whose old image comes from a
developcommit after Fail-closed HTTP helper: refuse public hosts without a usable proxy #4260 fails this row, whatever the candidate changes. That includes the default "newest older image with the same VERSION", which is now thedeveloptip. - The migration leg after the seed step (staging, upgrade, migration markers, mining after the upgrade) never runs on those images, so PRs cannot prove the upgrade path with a current baseline.
- Releases from 2.0.5 on will be post-Fail-closed HTTP helper: refuse public hosts without a usable proxy #4260 old images, so the upgrade test from them is blocked until this is fixed.
How I found it
- A VM test run of Twenty-nine fixes for 2.0.5 in one pull request, one commit each #4668's head (2eafb84) failed this one row, 1.9 s after the readiness poll passed. Its old image was built from
developat 495c6d3. - Two runs of other branches on 11-29 failed the same row, 2.0 s and 5.2 s after the poll. Their old images were also post-Fail-closed HTTP helper: refuse public hosts without a usable proxy #4260 (
ded67d97). - Runs whose old image predates Fail-closed HTTP helper: refuse public hosts without a usable proxy #4260 seeded in 5 to 12 s. Those were earlier runs on a 2.0.4 image from before the change, and a later run with
f2a2bd07as the exact old image. - Code reading at
develop495c6d3:tests/os/migration-recovery.shline 73 (the barepodman run) anddashboard/mining_dashboard/config/config.pylines 167-169 (the raise). Atv2.0.4(2f8a9d4) andf2a2bd07,TOR_SOCKS_PROXYhas a default and there is no raise. - Importing the 495c6d3
config.pywith an empty environment raises the error above; with the variable set it imports. This was run locally, not inside the guest. - What is not proven: the guest's own stderr for the step. It was discarded, and the guest was gone before collection.
How important is it
High for the test suite, low for users. Shipped appliances are not affected: the running dashboard always has the variable. But the provision migration leg is the only automated proof of the upgrade path. It now fails for any PR tested against a current baseline, and that hides real upgrade regressions behind a known red row.
Acceptance criteria
- A provision run whose old image is built from a post-Fail-closed HTTP helper: refuse public hosts without a usable proxy #4260 commit gets past the seed row and runs the rest of the migration leg.
- The seed container gets the same
TOR_SOCKS_PROXYthe old dashboard runs with. It is read from that container, not hard-coded, and the step still runs with--network none. - When the seed step fails, its stderr appears in the phase's output or artifacts.
- A provision run with a pre-Fail-closed HTTP helper: refuse public hosts without a usable proxy #4260 old image still passes the seed row.
Possible solutions
- Read the value from the stopped container and pass it through:
podman inspect dashboard --format '{{range .Config.Env}}{{println .}}{{end}}', keep theTOR_SOCKS_PROXY=line, and add-e "TOR_SOCKS_PROXY=..."to thepodman run. With--network nonethe writer cannot reach the proxy, so the value only needs to satisfy the import check. - Run the writer with
--env-filebuilt from the same inspect output, so any future fail-closed setting is covered too. - Have
migration-release-snapshot.pyreadDB_FILE_PATHwithout importing the full config module. This is smaller, but it couples the test to the config layout.
Whichever is chosen, keep the stderr: write it to a per-step file that is collected, or echo it on failure.
Models: claude-opus-5-5 (devops)
Activity