Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Critical mount-handling defects expose deployment-local configuration, break the OSTree fallback on older kernels, and prevent unmounting, while integration tests contain command errors and lack deterministic staged-image coverage.
5 open issues
What changed in this PR
Adds experimental access to booted or staged deployment image content through caller-owned read-only mounts, separate from persistent deployment state.
Changes:
- Adds
bootc image mountandunmountcommands for OSTree and composefs deployments. - Adds path validation and mount restrictions while intentionally allowing execution.
- Documents mount behavior and adds unit tests and an integration plan.
| File | Description |
|---|---|
tmt/tests/tests.fmf |
Registers the image-mount integration test. |
tmt/tests/booted/test-64-image-mount.nu |
Tests mounted content, restrictions, execution, and cleanup. |
tmt/plans/integration.fmf |
Adds the image-mount test plan. |
docs/src/bootc-experimental-image.7.md |
Documents commands, backend selection, and mount semantics. |
crates/lib/src/lib.rs |
Registers the image-mount module. |
crates/lib/src/image_mount.rs |
Implements deployment selection, mounting, unmounting, and unit tests. |
crates/lib/src/cli.rs |
Adds and dispatches the new image subcommands. |
crates/initramfs/src/lib.rs |
Adds a helper for read-only mount restrictions. |
Review effort: Balanced
This was referenced Nov 6, 2026
cgwalters
reviewed
Nov 10, 2026
|
|
||
| ## Mounting deployment image content | ||
|
|
||
| `bootc image mount` exposes a path from the locally available booted or staged |
Member
There was a problem hiding this comment.
A lot of overlap with bootc install mount right? We should rationalize these two.
| not initialize storage, migrate repository metadata, configure the ESP, or | ||
| change mount namespaces. | ||
|
|
||
| The mounted content is read-only, `nosuid`, and `nodev`. It intentionally |
Member
There was a problem hiding this comment.
Hmm, I'm not sure we need to enforce these type of mount options by default, but we should support -o or equivalent to specify
ckyrouac
force-pushed
the
feature/image-mount-api
branch
from
November 12, 2026 19:51
c998b14 to
26bc5ac
Compare
ckyrouac
marked this pull request as ready for review
November 12, 2026 20:38
ckyrouac
force-pushed
the
feature/image-mount-api
branch
from
November 12, 2026 20:42
26bc5ac to
676d47f
Compare
ckyrouac
force-pushed
the
feature/image-mount-api
branch
from
November 13, 2026 16:22
676d47f to
04ba242
Compare
Expose paths from booted or staged deployment images through caller-owned read-only mounts. Keep image content and persistent /var ownership separate, and add explicit unmount and integration coverage. Assisted-by: AI Signed-off-by: ckyrouac <ckyrouac@redhat.com>
Invoke external rm when capturing cleanup status, and close the mountpoint descriptor before unmounting it to avoid EBUSY. Assisted-by: AI Signed-off-by: ckyrouac <ckyrouac@redhat.com>
Acquire the OSTree lock through a writable detached sysroot clone while keeping read-only data paths attached. Stage detached source mounts in a private worker namespace before cloning so they can be attached in the caller namespace. Fix Nushell cleanup command capture and assert image mounts leave /sysroot options unchanged. Assisted-by: AI Signed-off-by: ckyrouac <ckyrouac@redhat.com>
Map checkout fallback /etc requests to pristine /usr/etc, and reject whole-root exports that cannot safely preserve that replacement in a non-recursive mount. Keep other source subtrees available without a detached child-mount operation. Document the backend-specific behavior and add divergent-marker regression coverage. Assisted-by: AI Signed-off-by: ckyrouac <ckyrouac@redhat.com>
Build and stage a distinct containers-storage image with a unique marker, then verify bootc image mount selects its /usr content rather than the booted image. Keep booted checks on Secure Boot composefs UKIs, where the shared fixture helper cannot produce a signed staged image. Assisted-by: AI Signed-off-by: ckyrouac <ckyrouac@redhat.com>
Libostree exposes runtime staged deployments through the current-root sysroot, not the detached backing sysroot used for locking. Use the selected deployment's relative path and checksum directly while keeping the real backing-sysroot lock and attached read-only data paths. Assisted-by: AI Signed-off-by: ckyrouac <ckyrouac@redhat.com>
ComposefsRepository::set_insecure returns a Result. Propagate it so docgen builds don't reject an unused must-use result and callers see setup failures. Assisted-by: AI Signed-off-by: ckyrouac <ckyrouac@redhat.com>
Register test and plan 64 from the current booted test metadata and remove stale entries for test 68. Assisted-by: AI Signed-off-by: ckyrouac <ckyrouac@redhat.com>
The staged marker is read without a trailing line feed in the image-mount test. Generate the sentinel without one and compare against that exact content, so the assertion remains strict without depending on line-ending normalization. Assisted-by: AI Signed-off-by: ckyrouac <ckyrouac@redhat.com>
Some UEFI test VMs do not expose the SecureBoot EFI variable. Treat only the missing-variable diagnostic as unknown, skip the unsealed staged fixture in that case, and continue the booted-image mount checks. Assisted-by: AI Signed-off-by: ckyrouac <ckyrouac@redhat.com>
ckyrouac
force-pushed
the
feature/image-mount-api
branch
from
November 16, 2026 18:40
04ba242 to
267c6d1
Compare
This branch has not been deployed
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.


Opening this as a draft for an initial design review.
Expose paths from booted or staged deployment images through caller-owned read-only mounts. Keep image content and persistent /var ownership separate, and add explicit unmount and integration coverage.
Assisted-by: AI