Add support for mounting upper layers with images#303
Conversation
65e9e21 to
4f1ed9d
Compare
|
I was chatting a bit with some people at the embedded recipes conf about using composefs without bootc (for a bit custom stuff) and they would need this to be able to couple composefs images with one or more writable layers. |
Johan-Liebert1
left a comment
There was a problem hiding this comment.
Some minor suggestions :)
98425d8 to
0eead6a
Compare
|
Also, I didn't look at it in detail, but I think composefs-setup-root could use this instead of manually doing the overlayfs mount. |
|
I don't remember well, but I think the "non initramfs" part of |
0eead6a to
2891abb
Compare
|
We have a reverse dependency issue in bootc, where it needs to pass composefs::mount::NO_OVERLAY to mount. What is our current API stability guarantees here? Do i add a new mount_with_overlay() for this, or do we just fix bootc later? |
2891abb to
7c01911
Compare
|
Seems easiest to go with mount_with_overlay(), so i added that. |
|
I have no idea what this failure is about: |
Would it help for us to support building bootc without the ostree dep? I would like to be able to do that. |
I think We can break API at any point, but it's also useful to have a bit of backpressure to avoid doing so unnecessarily. On the counterpoint, #225 does break API and in that PR I pointed the bootc revdep CI at a patch to adapt bootc to it. |
Nah, this was for "Flipper one" and the requirement they had was quite custom, focusing on allowing users to tweak and break their systems. I don't think it will ever be a good fit for bootc. |
It's likely bootc-dev/bcvk#153 - a rerun made it pass. |
cgwalters
left a comment
There was a problem hiding this comment.
Looks sane to me, but I would really like to build up the pattern of having integration tests again because I think they're easy to add.
| )?) | ||
| } | ||
|
|
||
| /// Options for adding a writable overlay layer to a composefs mount. |
There was a problem hiding this comment.
There's more possible options here - volatile is a big one!
I'm not saying we need to do that now, but we could make this #[non_exhaustive] to allow us to more easily add more options later.
Or we could just support pub options: Option<&'str>
There was a problem hiding this comment.
I made this a more generic non_exhaustive MountOptions.
|
One thing to bear in mind on this one too is the intersection with #304 - in the general case there what I think would work well is if we supported fd passing - for the mount operation we'd just hand back a detached fd by default. |
|
I updated this to use a more generic MountOption that we can later extend. |
This is useful from the cli if you want to add a writable layer to a composefs mount. This is better than doing it in a separate overlayfs layer as that would increase the overlayfs stacking depth, etc. Note: This adds the overlay option as a separate mount_with_options() as currently bootc calls repo.mount() which breaks API. We don't seem to have any callers of repo.mount_at() so the options can be added there. Signed-off-by: Alexander Larsson <alexl@redhat.com>
4fb9573 to
a3031b5
Compare
|
I rebased on main and added support for varlink to this |
Signed-off-by: Alexander Larsson <alexl@redhat.com>
a3031b5 to
45b721f
Compare
|
OK but you weren't replying to my "needs tests" thread. I think the token cost of doing these things via LLMs is so cheap relative to the value they provide, so I spent some tokens and pushed a commit with a test case. |
The previous commit added --upperdir, --workdir, and --read-write flags to `cfsctl mount`; add some test cases. Assisted-by: OpenCode (Claude Sonnet 4.6) Signed-off-by: Colin Walters <walters@verbum.org>
This is useful from the cli if you want to add a writable layer to a composefs mount. This is better than doing it in a separate overlayfs layer as that would increase the overlayfs stacking depth, etc.