Expand description
Pull dispatch and deployment staging for the ostree backend.
§Planned Pull paths
The top-level entry point for upgrade/switch will eventually select
among three paths based on the unified flag and filesystem capability:
-
Unified + reflinks (
unified = true, XFS/btrfs):pull_via_composefs_unified— the planned three-store pipeline. Pulls into containers-storage first, then ZeroCopy into composefs, then synthesizes the ostree commit via FICLONE. Seecrate::storefor the architecture diagram. -
Non-unified + reflinks (
unified = false, XFS/btrfs):pull_via_composefs— fetches from registry directly into composefs (no containers-storage), then synthesizes the ostree commit via FICLONE. -
No reflinks (ext4):
pull— the legacy ostree-native tar importer (ostree_container::store::ImageImporter).
§Planned composefs → ostree synthesis
The synthesis plan relies on import_from_composefs_repo from
ostree_ext::container::composefs_import to walk the composefs
filesystem tree and for each regular file:
- Reads uid/gid/mode/xattrs from composefs metadata. SELinux labels are
computed in bulk before the walk via
selabel()and looked up per-file; a NUL terminator is appended because composefs-rs omits it but the kernel stores it. - Computes the ostree content checksum in-memory (SHA-256 of
uid:gid:mode:xattrs:file-content). - Issues
ioctl(FICLONE)from the composefs object fd into a newO_TMPFILEin the ostree object directory. - Applies metadata (
fchown,fchmod,fsetxattr) and links the tmpfile into the ostree content-addressed path.
/etc is remapped to usr/etc; virtual toplevel paths (proc, sys,
dev, etc.) are excluded — matching the ostree-container tar importer.
§Auto-detection
image_exists_in_unified_storage checks whether the target image is already
present in bootc-owned containers-storage. Call sites use this to select
unified = true automatically without requiring an explicit flag from the
user once bootc image set-unified has been run.
Structs§
- Image
State 🔒 - State of a locally fetched image
- Layer
Progress 🔒Config - Configuration for layer progress printing
- Prepared
Import 🔒Meta - Required
Host 🔒Spec - Variant of HostSpec but required to be filled out
Enums§
- Merge
State 🔒 - The source of data for staging a new deployment
- Prepared
Pull 🔒Result
Constants§
- BASE_
IMAGE_ 🔒PREFIX - BOOTC_
DERIVED_ 🔒KEY - Set on an ostree commit if this is a derived commit
- ROLLBACK_
JOURNAL_ 🔒ID
Functions§
- check_
bootc_ 🔒label - check_
disk_ 🔒space_ composefs - Verify there is sufficient disk space to pull an image into the composefs store
for the native composefs backend (uses a raw
ImageManifest). - check_
disk_ 🔒space_ inner - Core disk space check: verify that
bytes_to_fetchfits within available space, leaving at leastmin_freebytes reserved. - check_
disk_ 🔒space_ ostree - Verify there is sufficient disk space to pull an image into the ostree repo. Respects the repository’s configured min-free-space threshold.
- check_
disk_ 🔒space_ unified - Verify there is sufficient disk space to pull an image into the composefs store
via the ostree unified-storage path (uses
PreparedImportMeta). - cleanup 🔒
- deploy 🔒
- descriptor_
of_ 🔒progress - find_
newest_ 🔒deployment_ name - fixup_
etc_ 🔒fstab - A workaround for https://github.com/ostreedev/ostree/issues/3193 as generated by anaconda.
- get_
base_ 🔒commit - If commit is a bootc-derived commit (e.g. has configmaps), return its base.
- handle_
layer_ 🔒progress_ print - Write container fetch progress to standard output.
- image_
exists_ 🔒in_ unified_ storage - Check whether the image exists in bootc’s unified container storage.
- new_
importer 🔒 - Wrapper for pulling a container image, wiring up status output.
- new_
importer_ 🔒with_ config - Wrapper for pulling a container image with a custom proxy config (e.g. for unified storage).
- new_
proxy_ 🔒config - Create an ImageProxyConfig with bootc’s user agent prefix set.
- origin_
from_ 🔒imageref - prefix_
of_ 🔒progress - prepare_
for_ 🔒pull - prepare_
for_ 🔒pull_ unified - Unified approach: Use bootc’s CStorage to pull the image, then prepare from containers-storage. This reuses the same infrastructure as LBIs.
- prune_
container_ 🔒store - Gather all bound images in all deployments, then prune the image store, using the gathered images as the roots (that will not be GC’d).
- pull 🔒
- Wrapper for pulling a container image, wiring up status output.
- pull_
from_ 🔒prepared - pull_
unified 🔒 - Unified pull: Use podman to pull to containers-storage, then read from there
- rollback 🔒
- Implementation of rollback functionality
- stage 🔒
- Stage (queue deployment of) a fetched container image.
- switch_
origin_ 🔒inplace - wipe_
ostree 🔒 - write_
reboot_ 🔒required - Update the /run/reboot-required file with the image that will be active after a reboot.