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

install: Add --skip-finalize #462

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

cgwalters
Copy link
Collaborator

A generic use case for installing to an existing filesystem in the general case will be:

  • bootc install to-filesystem
  • Inject other configuration or data into /etc and/or /var

(Until such time as we offer an explicit API to do the latter)

Add a --skip-finalize which will avoid remounting the root. This also should work around qemu-user not implementing the FITRIM ioctl, which can be hit when doing cross-architecture installs.

@henrywang
Copy link
Contributor

Ansible galaxy server flaky issue has been fixed/workaround by PR #463

A generic use case for installing to an existing filesystem
in the general case will be:

- `bootc install to-filesystem`
- Inject other configuration or data into `/etc` and/or `/var`

(Until such time as we offer an explicit API to do the latter)

Add a `--skip-finalize` which will avoid remounting the root.
This also should work around qemu-user not implementing the
FITRIM ioctl, which can be hit when doing cross-architecture
installs.

Signed-off-by: Colin Walters <walters@verbum.org>
@henrywang
Copy link
Contributor

PR #463 merged. I make a rebase to make test work in this PR.

@mvo5
Copy link
Contributor

mvo5 commented Apr 8, 2024

Fwiw, the FITRIM support to qemu-user got merged Friday (https://www.mail-archive.com/qemu-devel@nongnu.org/msg1034880.html) so we could maybe ask for a backport into fedora (like we did for FIFREEZE/FITHAW).

@cgwalters cgwalters enabled auto-merge April 8, 2024 19:41
@cgwalters
Copy link
Collaborator Author

Yep makes sense, but wouldn't you agree we should still do this PR too?

Copy link
Contributor

@jeckersb jeckersb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me, I will approve with deferral to you guys on whether or not we really need it. Seems like an overall improvement though that lets the user be explicit when it was otherwise implicit before (while still retaining the same behavior if not explicitly providing the flag)

@cgwalters cgwalters merged commit 593a932 into containers:main Apr 8, 2024
15 checks passed
@jeckersb
Copy link
Contributor

jeckersb commented Apr 8, 2024

Oh auto-merge 🤷‍♂️

Well... ship it! 😆

@mvo5
Copy link
Contributor

mvo5 commented Apr 9, 2024

Yep makes sense, but wouldn't you agree we should still do this PR too?

Sorry, yes - it makes sense on it's own too. So thanks for this :)

mvo5 added a commit to mvo5/images that referenced this pull request Apr 16, 2024
This commit brings back the pre-PR#462 version of BootcDiskImage as
BootcLegacyDiskImage. The rational is that right now we cannot
use `bootc install to-filesystem` for cross arch building the
FITRIM ioctl is not supported by qemu-user

To fix this is requires any of the following:
1. ensure containers/bootc#462 is available
   everywhere we care about
2. ensure https://www.mail-archive.com/qemu-devel@nongnu.org/msg1034508.html
   is available everywhere we care about
3. bind mount /usr/bin/true over /usr/bin/fsfreeze inside the buildroot.
   This bind mount can be done via `org.osbuild.bind` but it leaks into
   the manifest and that does not feel great.

So the alternative is to keep using the "old" pipeline that does not
yet use `bootc install to-filesystem` to for cross-arch builds and
the new pipeline for everything else. The selection will happen
on the level of `bib`.

This is all not nice and fragile and needs to be removed/reverted
again but short term might be the only thing we can do.
github-merge-queue bot pushed a commit to osbuild/images that referenced this pull request Apr 17, 2024
This commit brings back the pre-PR#462 version of BootcDiskImage as
BootcLegacyDiskImage. The rational is that right now we cannot
use `bootc install to-filesystem` for cross arch building the
FITRIM ioctl is not supported by qemu-user

To fix this is requires any of the following:
1. ensure containers/bootc#462 is available
   everywhere we care about
2. ensure https://www.mail-archive.com/qemu-devel@nongnu.org/msg1034508.html
   is available everywhere we care about
3. bind mount /usr/bin/true over /usr/bin/fsfreeze inside the buildroot.
   This bind mount can be done via `org.osbuild.bind` but it leaks into
   the manifest and that does not feel great.

So the alternative is to keep using the "old" pipeline that does not
yet use `bootc install to-filesystem` to for cross-arch builds and
the new pipeline for everything else. The selection will happen
on the level of `bib`.

This is all not nice and fragile and needs to be removed/reverted
again but short term might be the only thing we can do.
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Apr 17, 2024
This is a temporary measure to be able to move to
`bootc install to-filesystem` by default. Only for cross arch
builds we use the "legacy" pipeline to build an bootc image.

This should be removed once either:

- containers/bootc#462
or
- https://www.mail-archive.com/qemu-devel@nongnu.org/msg1034508.html

are released in the relevant places (centos/rhel).
github-merge-queue bot pushed a commit to osbuild/bootc-image-builder that referenced this pull request Apr 17, 2024
This is a temporary measure to be able to move to
`bootc install to-filesystem` by default. Only for cross arch
builds we use the "legacy" pipeline to build an bootc image.

This should be removed once either:

- containers/bootc#462
or
- https://www.mail-archive.com/qemu-devel@nongnu.org/msg1034508.html

are released in the relevant places (centos/rhel).
mvo5 added a commit to mvo5/bootc-image-builder that referenced this pull request Apr 17, 2024
This is a temporary measure to be able to move to
`bootc install to-filesystem` by default. Only for cross arch
builds we use the "legacy" pipeline to build an bootc image.

This should be removed once either:

- containers/bootc#462
or
- https://www.mail-archive.com/qemu-devel@nongnu.org/msg1034508.html

are released in the relevant places (centos/rhel).
github-merge-queue bot pushed a commit to osbuild/bootc-image-builder that referenced this pull request Apr 17, 2024
This is a temporary measure to be able to move to
`bootc install to-filesystem` by default. Only for cross arch
builds we use the "legacy" pipeline to build an bootc image.

This should be removed once either:

- containers/bootc#462
or
- https://www.mail-archive.com/qemu-devel@nongnu.org/msg1034508.html

are released in the relevant places (centos/rhel).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/install Issues related to `bootc install`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants