-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
Let's enable this in our -dev images right now to try to put together our new recommended default experience.
This requires ostreedev/ostree#3170 |
And this is blocked by osbuild/bootc-image-builder#18 because that will (hopefully) fix the SELinux labeling for the underlying backing dirs. (That said I may just try tomorrow to do a quick tactical patch for bib) |
Just to emphasize the difference is that after this lands, the deployed host will also run more like We're flipping around a big tradeoff here in that respect. I think it will make the system "feel" quite different from e.g. CoreOS/AtomicDesktops/etc. And we will also want to document how to turn off the transient overlay for those users who don't want it. Related to this, really, most container images run in production deployments would be much better done with a readonly root. Some deployments go to some effort to try to use quotas to limit writes to the container overlayfs, when it would again just be better done by making it strictly readonly. But, I think this alignment with the container defaults will help at a practical level. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Can you add what you wrote to the docs? I find the description very helpful and believe it's worth preserving/sharing.
I've pushed the combined result of this PR plus dependencies to |
Hmm, why not turn on state overlays instead for |
I like the idea of state overlays but again, it breaks the model "this works how docker works". |
We should definitely document though how to turn off the transient root in a derived build (requires dropping an override config and regenerating the initramfs), and at the same time doing state overlays.
While doing it via |
IMO, it's quite a safe assumption to make that users will expect packages that install in
Yeah, I think that'd work (but obviously also breaks the "works just like in traditional flows" abstraction). |
Can you elaborate on "work the same"? The main salient difference here is persistence of extra files across updates, is that what you're referring to? |
Right, application state across upgrades. The fact it applies only to applications that install to In a way, state overlays matches better the "implicit |
If in this statement "it" = "transient root", that's not true. It applies equally to Or stated simply:
The big difference between stateoverlays and transient root is that (In both of course we still have Hmm the more I think about it the more perhaps having root.transient persist across reboots by default is wrong...it conflicts more with a secure boot scenario.
I am confused because it sounds like you're arguing for transient root when you mention Dockerfile - in both transient root (host) and state overlays don't exist in the default container ecosystem.
It's a bit more nuanced that that as docker behavior doesn't quite match the ostree one for But yes, I am coming around to the idea that having the overlayfs persist by default across reboots was a bad idea. We could probably in theory just reuse systemd.volatile=overlay but at the minor cost of a double overlayfs. |
Right, but But again, everything else on the system doesn't behave this way (given that everything else is in
Let me rephrase this a different way: users will be installing various applications in their Dockerfile as part of creating a derived container image. Some of those applications will be in
State overlays isn't trying to model the container ecosystem. It's trying to make what works in traditional systems also work in image-based systems. |
We're debating this over in CentOS/centos-bootc-dev#27 and I have come to the conclusion that having changes to `/` persist across reboot by default was a bad idea. - It conflicts with any kind of secure boot scenario - Having things only go away on upgrades is in some ways even *more* surprising - The term `transient` implies this There may be a use case in the future for having something like `root.transient = persistent`, but this is just a better default.
We're debating this over in CentOS/centos-bootc-dev#27 and I have come to the conclusion that having changes to `/` persist across reboot by default was a bad idea. - It conflicts with any kind of secure boot scenario - Having things only go away on upgrades is in some ways even *more* surprising - The term `transient` implies this There may be a use case in the future for having something like `root.transient = persistent`, but this is just a better default. Signed-off-by: Colin Walters <[email protected]>
Yes, I recently discovered that the beaker project packages tests as RPMs that install to /mnt/test - and also xref internal link. But also remember...it's not just about RPMs. Because the OCI world created a model where applications own their own filesystem, it's really common to just put binaries in e.g. Should we have a linting tool against this? Probably...
This is definitely a point of disagreement per above. It'd be nice if we lived in that world...
Right, I agree. The ostree semantic for
I am just scared by that because it has a much higher level of magic. And by "magic" I mean "what precisely is the state of my files". The core tradeoff that we already covered is automatically having extra state/logs persist (good) versus having unintentional drift persist across changes. The idea behind image-based updates is having the sha256 digest of the image you get from |
Another angle I'd take this to is that stateoverlays conflicts with a secureboot direction, where we really must strictly separate signed code from local persistent (unverified/unsigned) state like logfiles etc. Training people to do hacks like (And to complete this picture we should be mounting |
I'm confused. Do you not agree that the great majority of software we ship in our images keep their code in
Right, not necessarily saying we should do that. Mostly food for thought.
I'll just repeat again that state overlays is about making |
For "our images" today - absolutely. But we're blasting open the doors for arbitrary 3rd party code and build processes generating derived images here...
We may need to do a realtime chat on this. I don't agree with "new conceptual model" because I am arguing it's how
Right. Bu that's how it works with podman/docker run and volumes too (OK I'm going to add |
|
See containers/bootc#294 This is particularly motivated by CentOS/centos-bootc-dev#27 because with that suddenly `dnf` will appear to start working but trying to do anything involving the kernel (i.e. mutating `/boot`) will end in sadness, and this puts a stop to that. (This also relates of course to ye olde osbuild#18 where we want the partitioning setup in the default case to come from the container) Signed-off-by: Colin Walters <[email protected]>
See containers/bootc#294 This is particularly motivated by CentOS/centos-bootc-dev#27 because with that suddenly `dnf` will appear to start working but trying to do anything involving the kernel (i.e. mutating `/boot`) will end in sadness, and this puts a stop to that. (This also relates of course to ye olde osbuild#18 where we want the partitioning setup in the default case to come from the container) Signed-off-by: Colin Walters <[email protected]>
See containers/bootc#294 This is particularly motivated by CentOS/centos-bootc-dev#27 because with that suddenly `dnf` will appear to start working but trying to do anything involving the kernel (i.e. mutating `/boot`) will end in sadness, and this puts a stop to that. (This also relates of course to ye olde osbuild#18 where we want the partitioning setup in the default case to come from the container) Signed-off-by: Colin Walters <[email protected]>
Jonathan and I had a realtime chat on this. One thing he wasn't aware of is that in the composefs case there is no special read-only bind mount over (And again to restate more generally, I think this aligns with the container model) We agreed that there is a big user experience difference between transient root and stateoverlays. And the default really matters. If we go with transient by default, we should definitely create another base image that disables transient root, and enables stateoverlay for Another option I guess is to just do composefs by default, and document (and test) both transient root and stateoverlays. (And hmm, I guess we should actually change |
Indeed. Specifically, the trade off is essentially:
I'm OK with either approach. I'm genuinely interested in what testers/users think of the two UXs. I mostly want the state overlay approach to be given fair consideration and get feedback. I'm less sure about supporting both longer term since it makes the story messier; I'm happy to drop the state overlay bits if it's judged to not add sufficient value. |
This came out of discussion in CentOS/centos-bootc-dev#27 Basically...I think what we should emphasize in the future is the combination of `bootc` and `dnf`. There's no really strong reason to use `rpm-ostree` at container build time versus `dnf`. Now on the *client* side...well, here's the interesting thing; with transient root enabled, `dnf install` etc generally just works. Of course, *persistent* changes don't. However, anyone who wants that can just `dnf install rpm-ostree` in their container builds. There is one gap that's somewhat important which is kernel arguments. Because we haven't taught `grubby` do deal with ostree, and we don't have containers/bootc#255 to change kargs per machine outside of install time one will need to just hand-edit the configs in `/boot/loader`. Another fallout from this is that `ostree container` goes away inside the booted host...and today actually this totally breaks bib until osbuild/bootc-image-builder#18 is fixed. Probably bootc should grow the interception for that too optionally.
See containers/bootc#294 This is particularly motivated by CentOS/centos-bootc-dev#27 because with that suddenly `dnf` will appear to start working but trying to do anything involving the kernel (i.e. mutating `/boot`) will end in sadness, and this puts a stop to that. (This also relates of course to ye olde #18 where we want the partitioning setup in the default case to come from the container) Signed-off-by: Colin Walters <[email protected]>
OK actually since we did ostreedev/ostree@0cff65d this means we actually aren't blocked by osbuild/bootc-image-builder#149 anymore! |
Now proposing this in the main image in CentOS/centos-bootc#356 |
Let's enable this in our -dev images right now to try to put together our new recommended default experience.