Skip to content

CON-1516: Remove vCPU gate from self-test preflight - #413

Draft
jjziets wants to merge 11 commits into
vast-ai:masterfrom
jjziets:CON-1516-remove-vcpu-self-test-preflight
Draft

CON-1516: Remove vCPU gate from self-test preflight#413
jjziets wants to merge 11 commits into
vast-ai:masterfrom
jjziets:CON-1516-remove-vcpu-self-test-preflight

Conversation

@jjziets

@jjziets jjziets commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove the self-test preflight hard gate based on offer["cpu_cores"] >= 2 * num_gpus
  • leave physical CPU validation to the self-test runtime image, which can inspect visible physical cores
  • remove the >64 direct-port advisory so hosts are only warned when too few direct ports are available
  • map 5001/udp when launching the self-test image and externally probe it after TCP /progress is reachable
  • select the new CLI/image contract tag family: vastai/test:self-test-cli-1.2.2-cuda-*
  • pass VAST_SELF_TEST_CLI_VERSION and VAST_SELF_TEST_CLI_CONTRACT_VERSION into the self-test instance
  • make daemon/startup status output conservative by default, with raw daemon evidence printed only under --debugging / --debuging
  • redact sensitive debug evidence before it is printed or written into the self-test support bundle
  • add manifest fields that explicitly separate CLI/API-visible instance artifacts from local host OS artifacts
  • fix false startup-error detection for package names like liberror-perl
  • keep raw daemon/status evidence in raw output and the diagnostic bundle without presenting it as a CLI-owned root-cause interpretation

Scope Note

  • This PR is the CLI side of physical CPU-core preflight alignment, UDP self-test verification, and the CLI/image contract bump to 1.2.2.
  • The paired self-test image/runtime change is in vast-ai/self-test#6. The image opens the UDP responder and rejects launchers that do not provide a compatible self-test contract.
  • A live bundle check against vastai/test:self-test-cli-1.2.2-cuda-11.8 confirmed the bundle includes CLI/API-visible instance evidence such as instance/daemon.log, instance/container.log, and instance/show-instance.json.
  • The manifest now records those under cli_visible_instance_artifacts / includes_cli_visible_instance_artifacts, while host-local artifacts are recorded separately under local_host_artifacts / includes_local_host_artifacts.
  • The bundle does not include host-side OS artifacts (dmesg, journalctl, kaalia logs, or full Docker daemon logs) unless a host-side collection path is used. Exact daemon/Docker startup root-cause mapping still needs daemon-side source/structured error codes or host-side logs.

Validation

  • ./.venv/bin/python -m pytest tests/cli/test_self_test_support_bundle.py -q — 9 passed, 1 existing pytest config warning
  • ./.venv/bin/python -m pytest tests/cli -q — 321 passed, 1 existing pytest config warning
  • git diff --check
  • graphify update . — updated graphify-out/graph.json and GRAPH_REPORT.md; skipped HTML because graph has 82,245 nodes
  • Live bundle inspection using machine 53944 and vastai/test:self-test-cli-1.2.2-cuda-11.8 confirmed CLI/API-visible log artifacts are present and includes_local_host_artifacts=false

Image Build / Dogfood

  • Canonical self-test image build was triggered from vast-ai/self-test#6 with push=true.
  • Run: https://github.com/vast-ai/self-test/actions/runs/28854407623
  • Inputs: image=vastai/test, tag_prefix=self-test-cli-1.2.2-cuda-, min_cli_version=1.2.2, cuda_version=all.
  • Validation jobs passed for CUDA 11.8, 12.8, 13.0, and 13.3.
  • As of this PR update, vastai/test:self-test-cli-1.2.2-cuda-11.8, vastai/test:self-test-cli-1.2.2-cuda-13.0, and vastai/test:self-test-cli-1.2.2-cuda-13.3 have built/pushed successfully; CUDA 12.8 is still running in the same workflow.

@robballantyne robballantyne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I will approve without requesting changes when test image is available

@jjziets

jjziets commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

CON-1531 follow-up pushed in 63f2752.

What changed:

  • Broadened self-test progress-stage parsing for the current image output (ResNet18 test on all GPUs, ECC test on all GPUs, NCCL distributed test with N GPUs, stress-ng and gpu-burn tests simultaneously).
  • Improved the offline runtime summary so it covers instances going offline before or during runtime.
  • Split repeated status polling/API failures into instance_status_poll_failed instead of folding them into startup timeout.
  • Cleaned up startup-timeout wording for hosts.
  • Surfaced cleanup_failed if the workload passes but the temporary paid instance cannot be destroyed.
  • Added tests for current image stage lines, status-poll timeout classification, and cleanup failure.

Validation:

  • ./.venv/bin/python -m pytest tests/cli -q -> 313 passed, 1 existing config warning.
  • Paid dogfood with latest PR image vastai/test:self-test-udp-dogfood-cuda-12.8:
    • Green machine 35008: passed TCP, UDP, system requirements, ResNet18, ECC, NCCL, stress/gpu-burn; cleanup succeeded.
    • Red machine 141071: preflight caught low reliability/upload; forced runtime failed with progress_endpoint_unreachable; support bundle printed and cleanup succeeded.

Local evidence/artifacts:

  • /Users/hanneszietsman/VastAi/CON-1531-self-test-error-flow-map.md
  • /Users/hanneszietsman/VastAi/dogfood-captures/host-self-test-latest-pr/20260625T090214Z.tar.gz

@jjziets
jjziets force-pushed the CON-1516-remove-vcpu-self-test-preflight branch from 63f2752 to f737010 Compare June 25, 2026 09:25
@jjziets

jjziets commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Final CON-1531 diagnostic follow-up SHA is now f737010 after amending in the catch-all unexpected_error path.

Additional tightening in the final amend:

  • Added first-class unexpected_error catalog copy and runtime diagnostic rendering for otherwise unhandled CLI exceptions.
  • Added preflight_checks stage marking before threshold checks run.
  • Added regression coverage for unexpected exception shaping/redaction.

Latest local validation:

  • ./.venv/bin/python -m pytest tests/cli/test_runtime_diagnostics.py tests/cli/test_self_test_support_bundle.py tests/cli/test_machines_commands.py -q -> 84 passed, 1 existing config warning.
  • ./.venv/bin/python -m pytest tests/cli -q -> 314 passed, 1 existing config warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants