bootc-dev / bootc-dev/bootc

Defer reading prepare-root config when using `--source-imageref

Open
#1,410 3 comments 1 reaction 0 assignees View on GitHub
area/install area/install-source-imgref triaged
Dominant language
Rust
Stars
2.3k
Forks
230
Avg merge
3d 12h
Merged PRs (30d)
38

Description

> What is the purpose of this file and why bootc needs it?

It looks like it uses it to know if to turn on fs-verity on the repo: https://github.com/bootc-dev/bootc/blob/5ed53c30f00f16b6330c8238a4966123d79f2f84/lib/src/install.rs#L684

But yeah, I think the main gap here is that one would expect that with `--source-imgref`, the `prepare-root.conf` to check comes from the target image and not the host environment. The problem of course is that at that point, the container image hasn't been pulled yet (because the filesystem we're pulling it into is still being initialized!).

So... one seemingly obvious fix here is to delay turning on fs-verity until _after_ we deploy the container image? I think the main downside of that is that it's much more expensive because you now have a lot more objects to iterate over. It's the same amount of I/O (I think) total, but when done upfront it's amortized over the whole ostree import operation. And obviously, we could do this only in the `--source-imgref` case.

_Originally posted by @jlebon in https://github.com/bootc-dev/bootc/discussions/1400#discussioncomment-13767156_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.