docs: Plan H — per-layer ZFS clone chain for daemon URIs (dockerd://, podman://)#20
Open
sodre wants to merge 2 commits intozenroot/mainfrom
Open
docs: Plan H — per-layer ZFS clone chain for daemon URIs (dockerd://, podman://)#20sodre wants to merge 2 commits intozenroot/mainfrom
sodre wants to merge 2 commits intozenroot/mainfrom
Conversation
Plan H extends Plan G's per-layer zfs clone chain to dockerd:// and
podman:// URIs via \`${engine} save\` (preserves per-layer tarballs +
manifest.json describing layer order) instead of \`${engine} export\`
(flattens). Layer digests are content-addressed via sha256 of each
layer.tar, so the same image won't share .layers/ datasets across
docker:// and dockerd:// sources (registry blobs are compressed; save's
layer.tar is uncompressed — same content, different sha) but multiple
local daemon images with shared base layers DO dedup at the .layers/
level.
Default-off — flag unset leaves the existing flat-export daemon path
byte-for-byte unchanged. Same dispatch shape as Plan G (chain-mode
gate on ENROOT_ZFS_LAYER_CHAIN=y, branched in import_daemon_pointer
and create_from_pointer's recovery arm).
Plan-doc only — depends on Plan G's helpers, which land in PR #17.
The doc/plans/README.md index and doc/zfs.md knob description will
follow when both Plan G and Plan H land on zenroot/main.
Signed-off-by: Patrick Sodré <patrick@zero-ae.com>
Signed-off-by: Patrick Sodré <patrick@zero-ae.com>
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.
Follow-up to #17 (Plan G). Adds the implementation plan for extending chain mode (
ENROOT_ZFS_LAYER_CHAIN=y) to daemon-local image URIs.Why a follow-up plan
Plan G (#17) only handles
docker://URIs because they go throughdocker::_prepare_layerswhich produces the per-layer directories the chain installer needs. The daemon path (dockerd://,podman://) uses${engine} export | tar -x— a flatten operation that drops layer information, so chain mode is silently a no-op for daemon URIs today.Plan H bridges that gap by switching the daemon path's extraction from
${engine} exportto${engine} save(which preserves per-layer tarballs in a tar archive plus amanifest.jsondescribing layer order), then routing through Plan G's existing_install_layer_chain.Tradeoffs spelled out in the plan
${engine} save | tar -xdumps each layer'slayer.tarto disk before extraction, so peak disk is ~1× the merged image size. Today's flat-export streams in a single pass with effectively no intermediate.docker://alpineand the same layer extracted viadockerd://alpineproduce different.layers/<digest>datasets — the registry blob is gzip/zstd-compressed anddocker save'slayer.taris uncompressed, so the sha256s differ. Within-source dedup (multiple daemon images that share a base) still works.podman save --format oci-archive) is not in scope.What lands in this PR
Plan markdown only —
doc/plans/2026-05-06-zfs-h-daemon-chain.md. The implementation references Plan G's_install_layer_chain/_apply_layer_payload/_build_layerhelpers, so this plan is unblocked once Plan G (#17) merges.Status
Draft — not for merge yet. Plan G (#17) should land first. The README/zfs.md cross-references will follow when both have landed.
🤖 Generated with Claude Code