Files
NODEDC_PLATFORM/infra/cms-deploy/R41_NODE_BASE_ACQUISITION.md
T

87 lines
5.5 KiB
Markdown

# CMS r41: exact registered Node base acquisition
Installed runner `4dce7493d61efe67b49337fa7eab3fc441988b22b625181f1547fa72d6fce75b`
was verified by the operator. Its status at 2026-11-05 06:41:31 UTC was
`cms-base-missing`, parentCount 0, nodeCount 5, rejected.layers 5. All five local
Node references failed the filesystem-prefix check, before label comparison.
r41 is still staged, with matching SHA and no applied/failed record or backup.
The Compose-label defect was real but did not by itself resolve NAS base lookup.
The original runtime reconstruction proved Node 24.18.0 and Yarn 1.22.22.
Neither the preserved env-file nor Compose overrides those variables. The
official public `node:24.18.0-alpine` metadata for linux/amd64 was retrieved and
verified locally. The mutable tag was used for discovery only; the policy pins:
- Manifest: `sha256:4ba75f835bb8802193e4c114572113d4b26f95f6f094f4b5229d2a77773e0afc`.
- OCI config: `sha256:91d56b2d4e1cf23103d90b0b024c1f489c288f9c3aba1042dd7279503b367de6`.
- Four filesystem layers; compressed size 57633665 bytes; created 2026-06-24.
Exact public bytes are committed as node24-base-manifest.json and
node24-base-config.json and embedded as data in the reviewed root runner. They
contain no application/private data or executable artifact hook. Hash checks
bind the manifest to the config and its immutable image identity.
This is an additive, source-registered base-acquisition policy within
dc-cms-release. Application manifests cannot select images, platforms, network
policy, commands or roots. Read-only preflight first tries the existing cache.
If none match, it checks the registered public metadata against the accepted
CMS image: complete strict RootFS prefix, platform, Node 24, exact inherited Env
and configuration, and the already-defined Compose label additions. A matching
version alone never suffices. The official image has WorkingDir `/`; the
predicate now admits that default root as well as empty/default values, before
the fixed Dockerfile sets `/app`. Only known absent-vs-empty OCI User/Variant
defaults are projected when comparing public metadata with Docker 24's API;
runtime fingerprints and full post-build comparison are not normalized.
Preflight performs no pull or registry request. On an exact match its proof
names registeredBase=node24-alpine-amd64-v1 and the fixed digest/config pair.
Canonical apply re-proves the full record against the accepted image. Only an
exact missing-image error for that reference permits:
`docker pull --platform linux/amd64 docker.io/library/node@sha256:4ba75f835bb8802193e4c114572113d4b26f95f6f094f4b5229d2a77773e0afc`
An already cached registered image needs no network. Pull is bounded to 300s;
permission, daemon, registry or timeout failures never select another image.
After acquisition the actual RepoDigest, pinned image identity, full layers and
inherited config are checked again before build. Classic Docker image identity
is the registered OCI config digest; containerd image stores use the registered
manifest digest. Both must still have the exact pinned repository digest and
filesystem/config proof. No arbitrary identity is admitted.
The existing clean temporary Dockerfile uses that proved local ID with
DOCKER_BUILDKIT=0 and --pull=false. The source Dockerfile is unchanged. Full
post-build configuration and runtime acceptance remain exact. Compose itself
still uses --no-build --pull never --no-deps and selects only cms-app. Source,
sites/projects, authentication, other services, databases, mounts, ports and
secrets retain the same checks and rollback. A downloaded immutable base may
remain in Docker cache after rollback; it is never pruned or used as authority
to bypass application acceptance. No old application image/layers are reused
as a build base.
When registered metadata fails, public status gives only a fixed rejection
category and the first four accepted layer digests, alongside candidate counts.
It never exports Env values, label values, file contents or arbitrary stderr.
This supports an exact follow-up if the NAS base differs from this public
candidate. NAS matching remains unproven until its own preflight succeeds.
Validation: 104 CMS tests, 95 Device Core tests, Python 3.8 AST and diff checks.
Focused tests cover no pull in preflight, source-byte integrity, exact proof,
wrong source/reference/config/layers/repository, cached/missing image behavior,
both store identities, missing-image aliases, timeouts and redacted diagnostics.
Existing canonical failed-build tests retain the automatic rollback path.
A real local integration builds original CMS source 4c6f133 with actual Compose
and this official base, removes only its newly acquired digest reference, then
invokes the actual resolver and builder on candidate source 4369f0a. Preflight
does not restore the image; apply acquires only the pinned digest. Candidate
build passes exact inherited configuration/Compose labels, unchanged source
Dockerfile, identical base layers, exported-layer exclusion of old/new private
project fixtures, adm-zip 0.6.1 and Node syntax checks. Local Docker Desktop uses
containerd identities; NAS classic-store identity is covered by focused tests.
Only isolated test tags and ephemeral network-disabled verification containers
are used. This test does not prove NAS layer equality or NAS registry access.
After root runner promotion the existing controller replans queued r41. No new
CMS artifact, bootstrap or failed-release replay is required. A canonical
application receipt is still required before migrating/publishing the two sites.