Skip to content

OS provision migration test: the old-dashboard seed step crashes because its bare container has no TOR_SOCKS_PROXY #4681

Backlog

Description

@pithead-developer

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

How I found it

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

Possible solutions

  1. Read the value from the stopped container and pass it through: podman inspect dashboard --format '{{range .Config.Env}}{{println .}}{{end}}', keep the TOR_SOCKS_PROXY= line, and add -e "TOR_SOCKS_PROXY=..." to the podman run. With --network none the writer cannot reach the proxy, so the value only needs to satisfy the import check.
  2. Run the writer with --env-file built from the same inspect output, so any future fail-closed setting is covered too.
  3. Have migration-release-snapshot.py read DB_FILE_PATH without 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

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions