Skip to content

Fix false "Corrupted" images in the first-boot test - #737

Merged
Marketen merged 1 commit into
masterfrom
marc/fix-image-integrity-check
Oct 9, 2026
Merged

Marketen merged 1 commit into
masterfrom
marc/fix-image-integrity-check

Conversation

@Marketen

@Marketen Marketen commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Problem

On fresh v0.3.26 installs, the first-boot test reports every DAppNode image as corrupted, then says "Test completed successfully":

doing docker image integrity test...
Error response from daemon: invalid reference format: repository name (library/171MB) must be lowercase
\e[31mImage 171MB Corrupted!\n\e[0m
...
Test completed successfully. Press enter to continue

Seen on a real install (Debian, v0.3.26). The images are fine. dappnode_test_install.sh took image IDs from column 3 of docker images, but newer Docker versions changed the default table to IMAGE ID DISK USAGE CONTENT SIZE EXTRA. Column 3 is now the size, so the test ran docker save 171MB. The raw \e[31m is a separate bug: that echo lacked -e.

Fix

  • Script: list and check images with explicit --format strings ({{.Repository}}:{{.Tag}}, {{.ID}}), so the output is the same on every Docker version, and fix the echo.
  • Honest result: say "Test completed successfully" only when no image failed; otherwise list the corrupted images. The flow is unchanged: it still clears .firstboot and waits for Enter.
  • Log: write the test output to /usr/src/dappnode/logs/dappnode_test_install.log. The test runs on its own console and used to leave no record, which also helps support.
  • E2E: fail the ISO E2E when that log reports corrupted images or lacks the success line. Also fix an existing ! grep check in the harness, which can never fail under set -e.

Verification

  • Ran the new integrity block against a stub docker with the new table: healthy images pass, a failing docker save flags exactly that image, and the old awk '{print $3}' reproduces 171MB / 2.08GB.
  • The ISO E2E on this PR now checks the first-boot test's result on real Debian and Ubuntu installs.

🤖 Generated with Claude Code

The image integrity test read image IDs from column 3 of `docker images`.
Newer Docker versions changed the default table (IMAGE, ID, DISK USAGE,
...), so column 3 is now the image size: the test ran `docker save 171MB`
and reported every image as corrupted on fresh installs, then still said
"Test completed successfully".

- List and check images with explicit `--format` strings, by repo:tag.
- Fix the missing `echo -e` that printed raw escape codes.
- Only say "completed successfully" when no image failed.
- Log the test to logs/dappnode_test_install.log; it runs on its own
  console and left no record.
- Make the ISO E2E fail when that log reports corrupted images or no
  success, and fix a `! grep` check that could never fail under set -e.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Marketen
Marketen requested a review from a team as a code owner October 9, 2026 13:21
@Marketen
Marketen merged commit 5805e08 into master Oct 9, 2026
14 checks passed
@Marketen
Marketen deleted the marc/fix-image-integrity-check branch October 9, 2026 13:44
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.

2 participants