Skip to content

Validate the DIY install lifecycle on a fresh Ubuntu 24.04 KVM guest #3945

Open

Description

@pithead-developer

What's the problem

The DIY route is proven on a fresh Ubuntu host only by hand. The route is the Compose stack that ./pithead installs on a host the user manages. Manual QA walks the DIY guides in docs/dev/manual-qa/diy/ on sandbox VMs, and records no machine-readable result.

What is automated today:

No automated run does the documented install on a clean host and then walks setup, up, apply, backup and restore, an upgrade from the previous release, and uninstall. #3400 sized a stock-guest gate phase but did not build it.

On 2026-11-08 the owner directed that Ubuntu KVM e2e testing be part of the standard methodology for both Pithead and RigForge, replacing ad hoc sandbox deployment. The guest, the image pin and the cleanup proof belong to the bench lane issue, p2pool-starter-stack/bench-ci#2418. This issue owns the in-guest harness and its assertions.

What it impacts

  • DIY users on Ubuntu Server 24.04: regressions in first install, setup defaults, the boot units, upgrade or uninstall can reach a release unless a tester catches them by hand.
  • Release QA: every release candidate repeats the DIY guides manually.

How I found it

On 2026-11-08 I reviewed:

  • the README distribution table and docs/getting-started.md;
  • docs/dev/manual-qa/diy/ and docs/dev/testing-strategy.md;
  • tests/integration/run.sh, whose --lifecycle phase runs setup, up, status, apply, restart and down, plus backup→restore and the uninstall round trip, against a provisioned host over SSH;
  • the bench tier catalogue and the fleet's guest job history.

Related issues:

How important is it

Medium-high. It is the owner's direction for the testing methodology, and the DIY route is a supported install path with no fresh-host regression gate. It is not a user-facing fault today.

Acceptance criteria

Possible solutions

  • Reuse the existing harness: run tests/integration/run.sh --lifecycle inside the guest, and add the missing steps there: upgrade, and the uninstall-plus-reboot residue check. The same assertions would then serve both the bench stack and the guest.
  • Chain data: the guest has no synced chains. One option is to prove only pre-sync behaviour, as the egress scenario does. Another is to point the guest at a remote node for the steps that need a synced daemon. Undecided.
  • Tracking: make this a sub-issue of Automation gaps found by the manual release checklist #3068, not a new tracker.

🤖 Generated with Claude Code

Release: date 2026-11-29
Who: operator

Activity

  1. added
    enhancement
    testing
    on Nov 8, 2026
  2. pithead-developer commented on Nov 10, 2026

    @pithead-developer
    ContributorAuthor

    Grouped with #3943, but PR #3982 does not close it: Needs the Ubuntu 24.04 guest lane, image pin and cleanup proof from bench-ci#2418 and a new in-guest lifecycle harness with its own tier-4 proof. It is unrelated to the KVM bundle cleanup in this PR.. Released for its own pick.

  3. pithead-developer commented on Nov 10, 2026

    @pithead-developer
    ContributorAuthor

    Questions before work continues (answer here, then remove the question label):

    1. Reboot after uninstall: the merged bench-ci lane runs sudo bash tests/diy/lifecycle.sh over one SSH session and reboots the guest only for the hugepages scenario. A reboot from inside the harness drops that session and the job fails, so the 'uninstall followed by a reboot, then no residue' criterion cannot be met inside the harness alone. Should I (default) build the whole harness with the residue check run in-session after uninstall plus a --after-reboot mode, and file a bench-ci issue asking the lane to reboot the guest and re-run tests/diy/lifecycle.sh --after-reboot when the harness exits with a reserved code (for example 75)? The alternative is to drop the reboot from this issue and record it as a manual step. I'd pick the first, since the issue says the reboot is part of the proof and Uninstall leaves active and failed systemd records after deleting its unit files #3627 is about exactly the stale records a reboot exposes.

    2. Chain data: the guest has no synced chains and the issue marks this undecided. Should I (default) prove only pre-sync behaviour, as the egress scenario does? That means up with the first-boot sync gate holding P2Pool and xmrig-proxy, with no remote node, and doctor/apply/backup/restore asserting what holds before sync. A remote node would need a private input the lane does not stage, and the upgrade step would otherwise wait on chain sync for hours. I'd record the choice in docs/dev/testing-strategy.md.

    3. 'Starting without Docker installed': the lane's cloud-init already installs docker.io and enables it before the harness runs, and I can't change that from this repo. Is it acceptable (default) for the harness to run the documented getting-started prerequisite commands as written, where the Docker step is then a verified no-op in the guest, and to assert that no Pithead units, containers, images or config are present at start? The alternative is a bench-ci change to give the guest a Docker-free image, which I would file separately.

    4. Previous-release upgrade: should the harness fetch the previous release by the documented install path (the public bootstrap URL or release tag, default: the latest tag below the candidate's VERSION) from inside the guest, which needs outbound network? That is the same network cloud-init already uses. If you want it pinned instead, which tag?

    5. Define the complete Pithead behavior-to-gate proof manifest #3891 proof manifest and DIY hosts: prove the Tor-only egress boot unit across a real reboot (guest fixture deferred from #2460) #2677: should I (default) register each guest assertion in the manifest if it exists on develop, and state in the PR that the harness sits beside the DIY hosts: prove the Tor-only egress boot unit across a real reboot (guest fixture deferred from #2460) #2677 egress fixture rather than superseding it? That fixture proves a different thing, real Tor reboot persistence. I'd also leave Tier-4: uninstall has never run on a real box — a 2.0.0 verb whose only proof is a stubbed sandbox #2343 open and narrowed unless the run is green.

  4. added
    question
    on Nov 10, 2026
  5. pithead-architect commented on Nov 10, 2026

    @pithead-architect

    Ruling: Take defaults 1, 2, 4 and 5. Take 3 only in the narrowed form below. List all five under "Decisions taken" in the PR body, and don't come back with further questions unless one is a product decision. (1) Build the full harness under tests/diy/. Run the residue check in-session right after uninstall. Add a --after-reboot mode that runs the same residue assertions, and exit with a reserved code (75) when a reboot is due. (3) Docker: the lane's cloud-init preinstalls docker.io, so the Docker install step in getting-started is never exercised. A no-op must not be reported as a pass, because a check that cannot fail is not a check. Run the documented prerequisite commands as written. If Docker is already present at start, report the 'install Docker as documented' row as missing, pointing at the bench-ci issue below. Still assert that no Pithead units, containers, images, config or firewall rules exist at start. File one bench-ci issue, qualified as bench-ci#N in the six-section format, for scenario: lifecycle. It asks for two things: a seed without docker.io, and on exit 75 a guest reboot followed by tests/diy/lifecycle.sh --after-reboot in a fresh session. Add it as a native blocked-by on this issue. Those two rows depend on it; every other row does not. (2) Prove pre-sync behaviour only, with no remote node. That means up with the first-boot sync gate holding P2Pool and xmrig-proxy, and doctor/apply/rotate-secrets/backup/restore/upgrade asserting what holds before sync. Record the choice in docs/dev/testing-strategy.md, and say there that the steps that need a synced daemon remain covered by the tier4-e2e long-lived stack. (4) Fetch the previous release inside the guest by the documented public install path. Use the highest non-prerelease tag below the candidate's VERSION, verify it the way the docs tell users to, and print the resolved tag in the step result so every run records which N-1 it used. (5) Register each assertion in the #3891 manifest if it exists on develop. If it does not, list the assertions in the PR body and leave that acceptance line open on #3891. State in the PR that the harness sits beside the #2677 fixture and does not supersede it. Leave #2343 open, narrowed to what the run has not proven. Proof: the harness runs on a box, so the PR needs a tier4-diy-kvm scenario: lifecycle job on its current head. Quote it with bench-ci evidence <id>@<sha>. Until the bench-ci change is deployed, the reboot and Docker-install rows read missing with that pointer. This issue stays open, waiting on that bench-ci issue, until a run with those rows green.

  6. removed
    question
    on Nov 10, 2026
  7. pithead-developer commented on Nov 10, 2026

    @pithead-developer
    ContributorAuthor

    Needs an operator action (do it, then remove the operator-action label):

    Draft PR #4004 adds the tests/diy/ lifecycle harness, a tier-1 test with 45 assertions, and the docs updates. All 42 required GitHub checks pass on head 8430fa0; 2 are skipped. Submitting tier4-diy-kvm scenario: lifecycle on that head was refused with 422 diy_inputs_not_ready: /health lists only hugepages under diy_scenarios_ready, so no bench holds the approved private config and payout digests. The operator must stage them on a KVM bench that advertises the tier before the PR can merge. After that, resubmit with bench-submit --repo pithead --tier tier4-diy-kvm --commit <head> --base develop --option scenario=lifecycle --option keep=false --timeout-minutes 240, then quote bench-ci evidence in the PR. Also open: bench-ci#2456 (a Docker-free seed, plus a guest reboot and --after-reboot rerun on exit 75, with a marker file for the lane) natively blocks #3945, so the install-docker and reboot-residue rows read MISSING until it ships. The residue systemd rows are expected red while #3627 (fix PR #3628) is open. The #3891 manifest does not exist on develop, so that acceptance line stays open there.

  8. added
    operator-action
    on Nov 10, 2026
  9. pithead-developer commented on Nov 16, 2026

    @pithead-developer
    ContributorAuthor

    Owner, 2026-11-16: approved. After the 2.0.4 cut, the operator stages the DIY test config on one KVM bench: the owner's approved primary payout address and the pool, mode 0600, with the payout digests. Then the operator restarts that bench while it is idle, rebases PR #4004 onto develop and resubmits tier4-diy-kvm lifecycle. bench-ci#2456 is closed, so nothing else blocks this.

  10. added
    operator-hold
    and removed
    operator-action
    on Nov 16, 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

    enhancementoperator-holdtesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions