-
Notifications
You must be signed in to change notification settings - Fork 290
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
sysroot: Detect "live" system on /run/ostree-live #1995
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
OK, fixed this up and got it to work. No CI here yet, but I did test this manually with an override and I've got some thoughts/code in motion for support for testing on "live" systems - it would be most ergonomic with coreos/ignition#935 |
I think this needs a rebase too on top of fixed CI. |
No functional changes; prep for a future patch which will load the "live" deployment rather than reading the bootloader configs.
Support read-only queries, but deny any attempts to make changes with a clear error. Now...in the future, we probably do want to support making "transient" overlays. See: coreos/fedora-coreos-tracker#354 (comment) Closes: ostreedev#1921
☔ The latest upstream changes (presumably #2045) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
Sorry for the delay on this. This would definitely be nice to fix!
* The existence of this file declares that the system | ||
* is booted "live" (fully in RAM). | ||
* | ||
* Since: 2020.1 |
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.
2020.4
* OSTREE_SYSROOT_LIVE_PATH: | ||
* | ||
* The existence of this file declares that the system | ||
* is booted "live" (fully in RAM). |
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.
I think one important thing worth noting here is that unlike the seemingly similar /run/ostree-booted
, this isn't written by OSTree itself. I.e. it's an agreed-upon API between OSTree and OS vendors. Maybe something like:
It is written by external code which drive OSTree in live contexts (e.g. live ISOs or live PXE boots).
?
@@ -284,6 +284,9 @@ gboolean | |||
_ostree_sysroot_ensure_writable (OstreeSysroot *self, | |||
GError **error) | |||
{ | |||
if (self->root_is_ostree_live) | |||
return glnx_throw (error, "sysroot does not support persistent changes"); |
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.
Minor: how about prefixing with found /run/ostree-live
?
Hmm OK, so just thinking about this some more and looking at the FCOS side; do we want to think more deeply about what the ideal integration would look like between the OS and libostree? For example, right now FCOS has to play hacks with the cmdline to fool I'm wondering if we should instead have a /cc @bgilbert |
@jlebon: GitHub didn't allow me to request PR reviews from the following users: bgilbert. Note that only ostreedev members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Yeah, that seems reasonable. I guess there's a much bigger topic around whether it's worth doing the "deployment root" for live systems at all. It might not be really hard to rework things so that libostree supports just not switching root in this case and operating in read-only mode. But OTOH, FCOS already shipped a live system built this way. |
OTOH live systems don't support in-place updates, so there aren't any backcompat constraints really; we are free to change the API between live systems and libostree. |
OK in the meantime I split off the prep patch in #2049 |
Gah the rabbit hole here is deep. So today, the FCOS live bits create an overlayfs for EDIT: Ah but that code already exits early on if |
@cgwalters: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@cgwalters: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Support read-only queries, but deny any attempts to make
changes with a clear error.
Now...in the future, we probably do want to support making
"transient" overlays. See:
coreos/fedora-coreos-tracker#354 (comment)
Closes: #1921