-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always generate composefs blob, don't enable runtime by default #3366
Conversation
Only compile tested locally so far |
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 for the goal. Not tested/fully reviewed the code change yet.
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.
Hmm, I think this breaks openshift/os#1678 again, which was the primary motivation for #3353.
Well no, I guess it's fine. Previously, we'd delete the composefs enablement config file to rely on the maybe
default. Now, I think we'd have to do an explicit sed
to change from true
to maybe
, which seems cleaner anyway.
Anyway, LGTM overall.
That's what the code is already doing, true? https://github.com/openshift/os/pull/1700/files#diff-20b4b6908742b7029e7ed3ac70d6db47f9b9420aaf337aee712da093d1f8d129R67 |
43a8d2b
to
95b13de
Compare
Followup to ostreedev@9a0acd7 Basically our composefs enablement flag has long had a tension between trying to do two things: - Enable generating the composefs blob (at deployment time) - Enable at runtime in prepare-root And we've hit issues in "ratcheting" enabling composefs across upgrades because of this. This change builds on the previous one, and now it's really simple to talk about: - If composefs is enabled at build time, we *always* generate a composefs blob at deplyment time - Configuring the prepare-root config now mostly only affects the runtime state. There is one detail though: in order to handle the verity requirement at deploy time, we do still parse the config then. But for the basic "is composefs enabled at all at runtime" that is now fully keyed off the config, not the build time or (worse) whether the deployment happened to have a composefs blob. For users who want composefs on, they need to do so in the base image configuration. Signed-off-by: Colin Walters <[email protected]>
95b13de
to
20ff086
Compare
Yes, we're currently editing it but we used to delete it. Mostly saying I guess we won't revert once we're ready to turn it back on but rather tweak it. |
Just a comment because I haven't seen it mentioned, enabling composefs requires some prep work, so having it turn on by default would have break some users:
|
|
Yup I know this is a bug that might get fixed, but at the same time this is not the first breakage that I see with grub2-probe (xfs bigtime and EL8), so it's a good excuse to migrate to bootupd |
@cgwalters I think this PR breaks the downgrade (not rollback) use case You use ostree with composefs compiled in but no |
The runtime default for composefs is off since this PR. If you don't have a config, you won't get composefs, even if we generate the composefs blob. Unless I'm missing something I don't see how your case would be broken. |
If you downgrade to an old build with no config and an ostree version without this PR, default runtime was maybe |
Yes sorry, I think you're right. We could add an option to disable generating the composefs blob too, and then one could ship that until the longest release from which you don't want to support rolling back to. Would be ugly.
Yes. I guess I'd probably recommend this as the most practical fix for folks in this situation - ship a systemd unit which runs e.g. |
I'm also open to adding a configuration option now which turns off the composefs blob generation, it'd be relatively straightforward. I guess it'd be way less hacky than deleting the blob. But of course, it just re-creates the ratcheting problem for the case where you do want to start a migration. |
I think I've nailed down my migration, no need for extra config If using ostree < 2025.1, to always generate the composefs blob:
(we unset on stop as we don't want to leak the setting to other deployments) And then to allow rollback, we delete the composefs blob when prepare-root.conf is missing
(no need to remount ro as we are in a mount namespace that is about to be destroyed) |
Followup to 9a0acd7
Basically our composefs enablement flag has long had a tension between trying to do two things:
And we've hit issues in "ratcheting" enabling composefs across upgrades because of this.
This change builds on the previous one, and now it's really simple to talk about:
There is one detail though: in order to handle the verity requirement at deploy time, we do still parse the config then.
But for the basic "is composefs enabled at all at runtime" that is now fully keyed off the config, not the build time or (worse) whether the deployment happened to have a composefs blob.
For users who want composefs on, they need to do so in the base image configuration.