chore: remove overlaybd from rchab#43
Open
jphenow wants to merge 2 commits into
Open
Conversation
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.
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.
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.
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 understandsImageRef.Layers, and the overlaybd snapshotter is gone from hosts. rchab has been carrying the build machinery and the/flyio/v1/buildOverlaybdImageendpoint as dead weight ever since.Cuts ~90 lines, two multi-stage Docker builds (including a
cmake+ C build with submodules), and a handful of runtimeapkdeps (libaio,libnl3,libssl3,libcurl,e2fsprogs-libs,zlib,zstd-libs) that only existed for the overlaybd binaries.Changes
Dockerfile: dropoverlaybd_snapshotter_buildandoverlaybd_buildstages, the fourCOPY --from=overlaybd_*lines, and the runtime lib deps those binaries linked against. The basedocker:24.0.7-alpine3.19image 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 = trueinfly.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:lazy_load_images = true→ POST returns 404 →dockerfile_builder.go:312catches the error, logsfailed 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
flyctlto removeUseOverlaybd/buildOverlaybdImage/daemon_url_test.gooverlaybd case, and to warn on[experimental] lazy_load_imagesso customers know to drop it fromfly.toml.Test plan
go build ./...passesgo test ./...passes (TestErrorremains green)fly deploy --remote-onlyagainst the new image still works for a Dockerfile deploy (manual bake)