Skip to content
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

WIP: takeover installs #78

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cgwalters
Copy link
Collaborator

lsm: Create tempfile in /var/tmp

This should more reliably support labeling. Prep for takeover
installs.

Signed-off-by: Colin Walters walters@verbum.org


install: Extract a unified SourceInfo struct

This data keeps track of the container and ostree commit information.
Prep for install --takeover where we want to serialize this data.

Signed-off-by: Colin Walters walters@verbum.org


WIP: takeover installs

This adds bootc install --takeover which moves the running
container into RAM and invokes systemctl switch-root to it, then
proceeds with an installation to the previously-used block device.

A key use case here is to "takeover" a running cloud instance, e.g.
provision the system via cloud-init or so which invokes
podman run --privileged ... bootc install --takeover.

At the current time, this is only scoped to "builtin" installation
types. We could support install-to-filesystem type flows too
by allowing externally-configured block storage setups to be
run as part of the current container (or in the fully general
case, a distinct container, though that adds a lot of complexity).


@openshift-ci
Copy link

openshift-ci bot commented Mar 16, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@cgwalters cgwalters force-pushed the reexec-switchroot2 branch 2 times, most recently from 18b683e to 773bdfa Compare March 17, 2023 17:40
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 22, 2023
I was trying to be really ambitious in containers#78
for the full "takeover" path.  This is a *much* *much* simpler variant
where we just:

- Blow away and reinitialize the `/boot` and `/boot/efi` partitions
- Write inside the existing filesystem, leaving the OS running

Then when we reboot, we'll just need to clean up the old OS
state (or optionally leave it).
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 23, 2023
I was trying to be really ambitious in containers#78
for the full "takeover" path.  This is a *much* *much* simpler variant
where we just:

- Blow away and reinitialize the `/boot` and `/boot/efi` partitions
- Write inside the existing filesystem, leaving the OS running

Then when we reboot, we'll just need to clean up the old OS
state (or optionally leave it).

Signed-off-by: Colin Walters <walters@verbum.org>
This adds `bootc install --takeover` which moves the running
container into RAM and invokes `systemctl switch-root` to it, then
proceeds with an installation to the previously-used block device.

A key use case here is to "takeover" a running cloud instance, e.g.
provision the system via cloud-init or so which invokes
`podman run --privileged ... bootc install --takeover`.

At the current time, this is only scoped to "builtin" installation
types.  We could support `install-to-filesystem` type flows too
by allowing externally-configured block storage setups to be
run as part of the current container (or in the fully general
case, a distinct container, though that adds a lot of complexity).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant