Repository navigation
image adopt: manifest digest, image probe, fit to the nodes and parallel pre-pull - #893
Merged
Merged
Conversation
michaellchung
force-pushed
the
own/image-adopt
branch
from
November 26, 2026 10:38
741d692 to
0b29f69
Compare
michaellchung
force-pushed
the
own/image-adopt-checks
branch
from
November 26, 2026 10:38
8b46564 to
ffb4328
Compare
michaellchung
force-pushed
the
own/image-adopt
branch
from
November 26, 2026 12:52
0b29f69 to
0970f1e
Compare
michaellchung
force-pushed
the
own/image-adopt-checks
branch
from
November 26, 2026 12:52
ffb4328 to
7127779
Compare
yeto.launch.image_adopt runs the first four steps of yeto image adopt on an SSH node inventory, each over an existing module: 1. manifest: a manifest HEAD (image_manifest) pins a tag to the registry's digest; a missing or unreadable manifest stops here, before any node is asked anything; 2. probe: one node runs the image once with its device flags and reads the CPU architecture, Python, torch, CUDA / HIP, the card architectures the kernels were built for, the engine packages and the yeto image lock; 3. fit: every node of the role against the image: CPU, device runtime, built card architectures (PTX counts for newer cards), the trainer floor of trainer_image_check, a catalog sampler image's record (engine_images.image_mismatch) and the role's engine package; 4. pull: the cluster preflight's ssh, host probe and image-root checks on every node, then the parallel docker pull only when every node has room (ClusterPreflight.pull). Every failing step raises AdoptError with its name and reason. The catalog is written only after step 5 (the smoke, wired in the next change) passed. own-cluster-fleet-stability 7.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st checks first - fit follows the CUDA binary compatibility rules: a cubin runs on the same major with an equal or higher minor, an arch-specific cubin only on its own capability, PTX forward-compiles (arch-specific PTX does not). A pass by the minor-version rule or PTX JIT is noted in the fit and the evidence; strict arch asks for the exact cubin. ROCm targets drop their feature suffix. The error names the rule. - the probe reads torch's build flags with no cards in the container and only falls back to the node's device flags when they are empty; it runs the node's container engine. Before it, the probe node passes the preflight host checks and an idle check (card processes from nvidia-smi / amd-smi / rocm-smi / npu-smi and running yeto containers); a busy node is refused unless allowed. - a failed step names the nodes that already hold the image. - the pull refuses a role with no docker node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…digest - the preflight's host probe and pull take a container engine (default docker, byte-for-byte the trainer preflight as before); podman checks its storage graphroot for room and pulls with podman. yeto image adopt pulls every node with its profile's engine and probes the probe node's image root of that engine; a role with no container engine is refused - split_tagged_ref drops a tag written before a digest, so the manifest URL and the token scope name the repository - tests for podman nodes, a full podman graphroot, family PTX across majors and to a lower minor Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, spares' images
- container_sudo: the engine runs as `sudo -n <engine>`, as an ssh sampler
pool's container.sudo runs it, so the rootful store is the one the host
probe checks, the pull fills and the probe and idle check use.
ClusterPreflight and host_sections take sudo (default off: the docker host
probe of the preflight is byte for byte main's, pinned by its digest).
- A podman node whose graphroot podman info does not print, or prints a path
the disk probe does not find, fails disk_images ("cannot confirm the disk
of the image store") instead of passing silently.
- rl_backend: a trainer-spare that names its own image no longer turns the
site image catalog off for the island; the island's own nodes decide.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
michaellchung
force-pushed
the
own/image-adopt-checks
branch
from
November 26, 2026 15:29
7127779 to
915313f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
own-cluster-fleet-stability task 7.2: the first four steps of
yeto image adopt, each over an existing module (yeto/launch/image_adopt.py).split_tagged_refofname:tag@sha256:...drops the tag, so the repository and the token scope arerepository:name:pull.image_manifestgainspin_digest(a manifest HEAD by tag or digest through the same token / Basic flow; a tag is pinned to the registry'sDocker-Content-Digest).manifest_statuskeeps its behavior: the HEAD logic moved into_manifest_headunchanged, with a:separator in messages for a tag. A missing or unreadable manifest stops the adoption before any node is contacted. WithYETO_IMAGE_MANIFEST_CHECK=offonly a digest is accepted.ClusterPreflight.hosts()) and an idle check: compute processes fromnvidia-smi --query-compute-apps,amd-smi process/rocm-smi --showpids, the process rows ofnpu-smi info, and runningyeto-containers. A busy node is refused unless allowed (allow_busy, a warning); an unreadable card tool is a warning. The probe then runs the image with the node's container engine (profile.container, docker or podman) and no cards: the built architectures come fromtorch._C._cuda_getArchFlags(); only when those are empty does it run again with the node's device flags. It readsuname -m, the yeto image lock, Python, torch, CUDA / HIP, the arch list and engine package versions.sm_XYruns on the same major with an equal or higher minor,sm_XYaonly on exactly X.Y, PTXcompute_XYJIT-compiles forward,compute_XYaonly on X.Y,sm_XYf/compute_XYfwithin the family. A pass by the minor-version rule or by PTX is noted in the fit result and in the record's evidence (compatible by CUDA minor-version rule; the smoke test is the final check);strict_arch(--strict-archin image adopt: trainer and sampler smoke, the yeto image adopt command and its docs #894) wants the exact cubin. ROCm targets drop their feature suffix (gfx90a:xnack-). A mismatch names the rule. The node's architecture is its profile'scard_arch(an inventory may set it). Also checked: CPU arch, device runtime, the trainer floor (trainer_image_check.image_problem), a catalog sampler image's record (engine_images.image_mismatch), the role's engine package, and a probe node of no known architecture (refused).ClusterPreflight.pull()runs ssh and host probes on every node, and only when none failsssh/host_probe/disk_images(--min-image-free-gib, default 120) runs the parallel pull. The nodes are grouped by their container engine (profile.container): docker nodes are pulled withdocker pull, podman nodes withpodman pull, and the disk check of a podman node measures podman's storage (podman infographroot; the fix text points atgraphrootinstorage.conf). A graphroot thatpodman infodoes not print, or that the disk probe does not find, is adisk_imagesFAIL ("cannot confirm the disk of the image store"), no longer a silent pass.ClusterPreflightandhost_sectionstake the engine andsudoas parameters defaulting to docker without sudo: the preflight's own calls are unchanged and its docker host probe is byte for byte main's (a test pins the sha256 of the rendered script, recorded from main). Fit no longer refuses podman; a node with no container engine is refused.AdoptRequest.container_sudo): an ssh sampler pool withcontainer.sudo: truerunssudo -n podman, whose rootful store differs from the user's. Withcontainer_sudoevery engine call of the adoption goes throughsudo -n: the host probe's graphroot (and, for docker,docker infoand the data root), the pull, the probe'srunand the idle check'sps; the image-removal hint sayssudo -n <engine> rmi. The CLI (image adopt: trainer and sampler smoke, the yeto image adopt command and its docs #894) takes it from the pool config or--container-sudo.rl_backend, atrainer-sparenode that names its ownimage:no longer turns the site image catalog off for the island; only the island's own nodes decide whether the configuration names its image (the spares still have to fit the record).Adopter.run()then calls the smoke (step 5, injected; the real smoke is in #894) and writes the catalog only after it passed. Every failed step raisesAdoptError(step, reason); once the image is on some nodes (the probe node, the nodes whose pull passed) the error names them, says the image stays there for a retry and how to remove it (docker rmi), and carries them inAdoptError.holding.Tests
tests/test_image_adopt.py(65 tests) with a fake registry and the preflight's fake B300 cluster: manifest pinning (anonymous, token flow, no digest header, check off, missing, denied); the probe argv without cards, with cards as the fallback, podman, a node with no container engine; the probe body under bash without torch; host checks before the probe (no probe on a full image root); busy parsing per family (nvidia-smi CSV, npu-smi process rows, amd-smi CSV, rocm-smi table), the busy script under bash, busy refused / allowed with a warning / unreadable tool warned; the fallback probe; CUDA rule table (sm_100 on B300 and sm_80 on A10G pass by the minor rule, sm_86 on A100, sm_100a on B300, sm_120 on B300, arch-specific PTX, newer PTX refused; family suffix; exact cubins; ROCm with and without feature suffix; empty list), strict arch, family PTX across majors (compute_100f on B300 passes, on RTX PRO 6000 and compute_103f on B200 refused), profile card_arch, minor-rule notes in the fit and the evidence; unknown probe-node architecture refused; trainer floor; catalog sampler record; pull gates; no docker node; held nodes on fit, pull and smoke failures; success writes the record. Added this round: podman nodes probed, checked and pulled with podman (the first one runtime rootfs, so the engine, not the runtime, decides); the podman graphroot disk check; a pull with no container engine; the docker host probe of the preflight unchanged; a tag next to a digest left out of the repository and of the token scope (the fake registry checks the scope it was asked for).podman infoof the host probe through sudo), pulls, probes and checks idle throughsudo -n; docker with sudo readsdocker infoand its data root through sudo, without sudo unchanged; the docker host probe's digest equals main's for a node with and without mounts; a spare naming its own image does not turn the catalog off, a trainer node naming one does. The podman tests now give the graphroot a disk row (they passed before only because a missing row passed silently).tests/test_image_adopt.py70 tests,tests/test_site_images.py69.engine_ofwas removed as redundant.Customer gate
examples/k31dry-runs, normalized: line-for-line identical to main d9fb379. No golden file changed (the preflight goldens included).Base is now main: #889 merged as d9fb379 and its commits are gone from this branch (rebased onto main d9fb379, which also has #897 and #898;
ClusterPreflightkeeps main'smax_parallel/inventorynext toengine/sudo).The CLI side of the profile fix (load_profiles, the dry-run text per engine,
--container-sudo/--pool-config) is in #894, whereyeto image adopt'smain()lives.Not merged; part 2 of 3 (#894 is stacked on it).
🤖 Generated with Claude Code