Skip to content

chore: remove overlaybd from rchab#43

Open
jphenow wants to merge 2 commits into
mainfrom
jphenow/purge-overlaybd
Open

chore: remove overlaybd from rchab#43
jphenow wants to merge 2 commits into
mainfrom
jphenow/purge-overlaybd

Conversation

@jphenow

@jphenow jphenow commented Apr 20, 2026

Copy link
Copy Markdown
Member

Summary

Removes overlaybd support from rchab. The platform side of the feature was removed in nomad-firecracker#3341 (merged 2025-05-22) — flyd no longer understands ImageRef.Layers, and the overlaybd snapshotter is gone from hosts. rchab has been carrying the build machinery and the /flyio/v1/buildOverlaybdImage endpoint as dead weight ever since.

Cuts ~90 lines, two multi-stage Docker builds (including a cmake + C build with submodules), and a handful of runtime apk deps (libaio, libnl3, libssl3, libcurl, e2fsprogs-libs, zlib, zstd-libs) that only existed for the overlaybd binaries.

Changes

  • Dockerfile: drop overlaybd_snapshotter_build and overlaybd_build stages, the four COPY --from=overlaybd_* lines, and the runtime lib deps those binaries linked against. The base docker:24.0.7-alpine3.19 image supplies what dockerd itself needs.
  • dockerproxy/overlaybd.go: delete.
  • dockerproxy/main.go: stop registering /flyio/v1/buildOverlaybdImage.

Customer impact

Zero for the common case. The only customers who can hit the removed endpoint are those with [experimental] lazy_load_images = true in fly.toml. Today they get a silently broken deploy: rchab converts the image and returns a hash, but flaps/flyd ignores the layer manifest. After this PR:

  • Old flyctl with lazy_load_images = true → POST returns 404 → dockerfile_builder.go:312 catches the error, logs failed to build lazy-loaded image, not using lazy-loading, and falls through to a normal image build. Strictly better than today.

Follow-up

Separate PR against flyctl to remove UseOverlaybd / buildOverlaybdImage / daemon_url_test.go overlaybd case, and to warn on [experimental] lazy_load_images so customers know to drop it from fly.toml.

Test plan

  • go build ./... passes
  • go test ./... passes (TestError remains green)
  • Docker image builds cleanly in CI (verify on this PR)
  • fly deploy --remote-only against the new image still works for a Dockerfile deploy (manual bake)

Overlaybd was an accelerated-container-image format that rchab converted
images into on demand via POST /flyio/v1/buildOverlaybdImage. The
platform side of the feature — flyd's ImageRef.Layers handling and the
overlaybd snapshotter on hosts — was removed in nomad-firecracker#3341
(merged 2025-05-22). Since then, any flyctl client with
[experimental] lazy_load_images = true in fly.toml was producing a
silently-broken deploy: rchab would happily convert and return an
overlaybd hash, but flaps/flyd ignored the resulting layer manifest.

Cut the dead code at the source:

- Drop the two overlaybd build stages from the Dockerfile (the
  accelerated-container-image snapshotter and the libaio/libnl/cmake-
  based overlaybd build). Drop the runtime apk deps those binaries
  linked against (libcurl, e2fsprogs-libs, libaio, libnl3, libssl3,
  zlib, zstd-libs — the base docker:24.0.7-alpine3.19 image supplies
  what dockerd itself needs).
- Delete dockerproxy/overlaybd.go.
- Stop registering /flyio/v1/buildOverlaybdImage in main.go.

Old flyctl clients with lazy_load_images still set will now get an
explicit 404 from rchab. dockerfile_builder.go:312 catches that and
warns 'failed to build lazy-loaded image, not using lazy-loading',
falling through to a normal image build — strictly better than the
silent platform-side breakage they get today. A follow-up PR against
flyctl will remove the client-side call path and warn on the
lazy_load_images flag so customers know to drop it from fly.toml.

Cuts ~90 lines and a couple of minutes off every Dockerfile build.
@jphenow jphenow requested a review from dangra April 20, 2026 21:50
Added alongside the other overlaybd runtime libs in #32 for
overlaybd's ext4 layer construction. Nothing else in the image
uses mke2fs/e2fsck/resize2fs/tune2fs.

@dangra dangra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤟🏼

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