Skip to content

fix(scripts): accept the release index digest in verify-cluster - #210

Merged
dmf-cms-automerge[bot] merged 1 commit into
mainfrom
fix/859-verify-index-digest
Nov 7, 2026
Merged

dmf-cms-automerge[bot] merged 1 commit into
mainfrom
fix/859-verify-index-digest

Conversation

@znerol2

@znerol2 znerol2 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Summary

scripts/verify-cluster.sh failed on a correct 0.41.0 rollout. The release publishes a two-platform index, so the pod's imageID is the index digest, and the script compared it with the arm64 child digest.

The digest check is now one Python step that checks every running pod the deployment selects. A pod passes when:

  • its dmf-cms container is in state running, and
  • the node's architecture equals DMF_CMS_IMAGE_ARCH, and
  • for an index: the index lists exactly one manifest for the node's os and architecture, and the pod's digest is the index digest (the sha256 of the raw registry bytes) or that child's digest;
  • for a single-platform manifest: the pod's digest equals it, and the config's os and architecture, read by digest, match the node.

The Kubernetes API can't show which index child a runtime selected. The header states the assumption: the runtime picks the child for the node's own platform.

Verification

  • Live, read-only, against a sandbox running 0.41.0: digest check passes, healthz 200, exit 0. The script on main exits 1 with DIGEST MISMATCH against the same cluster.

  • skopeo inspect --raw docker://ghcr.io/dmfdeploy/dmf-cms:0.41.0 | shasum -a 256 gives e797da4c…, the pod's digest.

  • Stub runs under macOS /bin/bash 3.2. Each of these fails:

    • node amd64 with DMF_CMS_IMAGE_ARCH=arm64;
    • an index with only windows/arm64;
    • an index with two linux/arm64 children;
    • a second pod with a wrong digest;
    • the other platform's child digest;
    • a terminated container, or running: null;
    • a single manifest for another platform.

    The matching cases pass.

  • shellcheck and bash -n pass.

Review

Four rounds of adversarial review. The last one passed.

Closes dmfdeploy/dmfdeploy#859

Since releases publish a two-platform index, a correct rollout records
the index digest as the pod's imageID, and the digest check compared it
with the arm64 child digest and failed.

The digest check is now one Python step over every running pod. A pod
passes when its dmf-cms container is running and its digest is the
index digest or the child digest for its node's os and architecture,
with the index listing exactly one such child. A single-platform
manifest passes on its digest when its config platform matches the
node. The header states the one assumption the API cannot check: the
runtime selects the child for the node's own platform.

Closes dmfdeploy/dmfdeploy#859

Signed-off-by: znerol2 <6800371+znerol2@users.noreply.github.com>
@znerol2
znerol2 requested a review from a team as a code owner November 7, 2026 12:17
@dmf-cms-automerge
dmf-cms-automerge Bot enabled auto-merge (rebase) November 7, 2026 12:22

@lkirc lkirc left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Static review of b37d3ba completed. No blocking findings.

@dmf-cms-automerge
dmf-cms-automerge Bot merged commit 457cb32 into main Nov 7, 2026
18 checks passed
@dmf-cms-automerge
dmf-cms-automerge Bot deleted the fix/859-verify-index-digest branch November 7, 2026 12:45
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.

verify-cluster.sh reports a false digest mismatch for a multi-platform image

2 participants