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

Switch to using OSBuild for most CoreOS boot image building #1653

Closed
dustymabe opened this issue Jan 23, 2024 · 16 comments
Closed

Switch to using OSBuild for most CoreOS boot image building #1653

dustymabe opened this issue Jan 23, 2024 · 16 comments

Comments

@dustymabe
Copy link
Member

dustymabe commented Jan 23, 2024

Since the beginning in CoreOS we have inherited or developed tooling inside COSA (CoreOS Assembler) to take the created OSTree commit and stick that into all of our different disk images that we ship (qemu, aws, openstack, ISO, etc).

Since we are the only consumers of COSA we have the desire to not maintain the bespoke image building code over the long term. The consensus is to use Image Builder/OSBuild for disk image building in the future. A good amount of work has gone into enabling OSBuild to be able to do this already.

This will also allow anyone who has created a container layer (see https://github.com/coreos/layering-examples/) to build a boot image from a derived container layer using OSBuild and not requiring COSA.

For the first round of this we will focus on building the qemu, metal and metal4k images. Most other images that we build are actually based off of the qemu image so they will also be indirectly affected (in the future we'll use OSBuild to build them directly).

Out of scope for this first round is the ISO/PXE artifacts as those are a bit more complicated.

@cgwalters
Copy link
Member

I edited your text to s/image/disk image/ for osbuild.

@dustymabe
Copy link
Member Author

We discussed this in the Community Meeting Today:

* AGREED: We will roll out disk image building using OSBuild to our `rawhide`
          mechanical stream first (this is a non-user facing stream). Then we
          will roll out OSBuild to the `next` stream and let it soak there for
          some time. We may choose to switch over `testing` before the rebase
          to F40, but we won't do it until F40 has at least reached `next` at
          F40 beta time. (@dustymabe:matrix.org, 16:52:30)

@dustymabe dustymabe removed the meeting topics for meetings label Jan 24, 2024
@dustymabe dustymabe self-assigned this Jan 24, 2024
dustymabe added a commit to dustymabe/fedora-coreos-pipeline that referenced this issue Jan 31, 2024
@dustymabe
Copy link
Member Author

dustymabe commented Jan 31, 2024

First step of enablement for this in the pipeline:

dustymabe added a commit to coreos/fedora-coreos-pipeline that referenced this issue Jan 31, 2024
@dustymabe
Copy link
Member Author

OK last week we started building using OSBuild for rawhide in our pipeline.

In order to compare a little I decided to write a small helper utility to do size comparison. diffbuildsizes.py.txt

Here is the output for the OSBuild built artifacts:

    platform     | compression  | 40.20240131.91.0 | 40.20240201.91.0
---------------------------------------------------------------------
qemu             | compressed   | 663MiB           | 848MiB          
qemu             | uncompressed | 1577MiB          | 876MiB          
metal4k          | compressed   | 661MiB           | 670MiB          
metal4k          | uncompressed | 2458MiB          | 2458MiB         
metal            | compressed   | 663MiB           | 698MiB          
metal            | uncompressed | 2458MiB          | 2458MiB         

What I really don't understand is the sizes for the qemu image. The uncompressed size is much smaller, but the compressed size is about 185MiB larger. All of this analysis is done using the size values from the meta.json file.

@dustymabe
Copy link
Member Author

OK I think I figured this out. OSBuild does the qcow2 conversion with compression on. This means the contents are internally compressed, which explains why the "uncompressed" size is much better (876MiB versus 1577MiB), but that means the outer xz compression is less effective (848MiB versus 663MiB).

dustymabe added a commit to dustymabe/coreos-assembler that referenced this issue Feb 5, 2024
We'll open a PR upstream to make compression an option for this stage,
but for now we'll just disable it in the code because we know we don't
want it: coreos/fedora-coreos-tracker#1653 (comment)
dustymabe added a commit to coreos/coreos-assembler that referenced this issue Feb 6, 2024
We'll open a PR upstream to make compression an option for this stage,
but for now we'll just disable it in the code because we know we don't
want it: coreos/fedora-coreos-tracker#1653 (comment)
lukewarmtemp added a commit to lukewarmtemp/osbuild that referenced this issue Feb 6, 2024
Modify the stages/org.osbuild.qemu stage such that compression is.
Optional. This resolves the image size differences between an image
built with coreos assember vs osbuild, as discussed in:
coreos/fedora-coreos-tracker#1653 (comment)
lukewarmtemp added a commit to lukewarmtemp/osbuild that referenced this issue Feb 6, 2024
Modify the stages/org.osbuild.qemu stage such that compression is
optional. This resolves the image size differences between an image
built with coreos assember vs osbuild, as discussed in:
coreos/fedora-coreos-tracker#1653 (comment)
lukewarmtemp added a commit to lukewarmtemp/osbuild that referenced this issue Feb 6, 2024
Modify the stages/org.osbuild.qemu stage such that compression is
optional. This resolves the image size differences between an image
built with coreos assember vs osbuild, as discussed in:
coreos/fedora-coreos-tracker#1653 (comment)
lukewarmtemp added a commit to lukewarmtemp/osbuild that referenced this issue Feb 7, 2024
Modify the stages/org.osbuild.qemu stage such that compression is
optional. This resolves the image size differences between an image
built with coreos assember vs osbuild, as discussed in:
coreos/fedora-coreos-tracker#1653 (comment)
lukewarmtemp added a commit to lukewarmtemp/osbuild that referenced this issue Feb 7, 2024
Modify the stages/org.osbuild.qemu stage such that compression is
optional. This resolves the image size differences between an image
built with coreos assember vs osbuild, as discussed in:
coreos/fedora-coreos-tracker#1653 (comment)
lukewarmtemp added a commit to lukewarmtemp/osbuild that referenced this issue Feb 7, 2024
Modify the stages/org.osbuild.qemu stage such that compression is
optional. This resolves the image size differences between an image
built with coreos assember vs osbuild, as discussed in:
coreos/fedora-coreos-tracker#1653 (comment)
lukewarmtemp added a commit to lukewarmtemp/osbuild that referenced this issue Feb 7, 2024
Modify the stages/org.osbuild.qemu stage such that compression is
optional. This resolves the image size differences between an image
built with coreos assember vs osbuild, as discussed in:
coreos/fedora-coreos-tracker#1653 (comment)
lukewarmtemp added a commit to lukewarmtemp/osbuild that referenced this issue Feb 7, 2024
Modify the stages/org.osbuild.qemu stage such that compression is
optional. This resolves the image size differences between an image
built with coreos assember vs osbuild, as discussed in:
coreos/fedora-coreos-tracker#1653 (comment)
lukewarmtemp added a commit to lukewarmtemp/osbuild that referenced this issue Feb 7, 2024
Modify the stages/org.osbuild.qemu stage such that compression is
optional. This resolves the image size differences between an image
built with coreos assember vs osbuild, as discussed in:
coreos/fedora-coreos-tracker#1653 (comment)
dustymabe pushed a commit to lukewarmtemp/osbuild that referenced this issue Feb 7, 2024
Modify the stages/org.osbuild.qemu stage such that compression is
optional. This resolves the image size differences between an image
built with coreos assember vs osbuild, as discussed in:
coreos/fedora-coreos-tracker#1653 (comment)
marmijo added a commit to marmijo/fedora-coreos-streams that referenced this issue Jun 27, 2024
includes updates for the following:
   - 2024-05-21:
	- coreos/fedora-coreos-tracker#1653
   - 2024-06-03
   - 2024-06-17:
	- coreos/fedora-coreos-tracker#1722
marmijo added a commit to marmijo/fedora-coreos-streams that referenced this issue Jun 27, 2024
includes updates for the following:
   - 2024-05-21:
	- coreos/fedora-coreos-tracker#1653
   - 2024-06-03
   - 2024-06-17:
	- coreos/fedora-coreos-tracker#1722
marmijo added a commit to marmijo/fedora-coreos-streams that referenced this issue Jun 27, 2024
includes updates for the following:
   - 2024-05-21:
	- coreos/fedora-coreos-tracker#1653
   - 2024-06-03
   - 2024-06-17:
	- coreos/fedora-coreos-tracker#1722
marmijo added a commit to coreos/fedora-coreos-streams that referenced this issue Jun 27, 2024
includes updates for the following:
   - 2024-05-21:
	- coreos/fedora-coreos-tracker#1653
   - 2024-06-03
   - 2024-06-17:
	- coreos/fedora-coreos-tracker#1722
@marmijo
Copy link
Member

marmijo commented Jul 17, 2024

The fix for this went into stable stream release 40.20240504.3.0. Please try out the new release and report issues.

@marmijo marmijo removed the status/pending-stable-release Fixed upstream and in testing. Waiting on stable release. label Jul 17, 2024
@travier
Copy link
Member

travier commented Jul 31, 2024

Closing as this is now in stable.

@travier
Copy link
Member

travier commented Jul 31, 2024

Likely fallout from this issue: #1771

jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this issue Sep 9, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0.
This is likely due to a missing step in the OSBuild pipeline as this
started with coreos/fedora-coreos-tracker#1653.

This should be removed after the next barrier release, if the newly
produced images are fixed.

See coreos/fedora-coreos-tracker#1771
And coreos/fedora-coreos-tracker#1772
jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this issue Sep 9, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0.
This is likely due to a missing step in the OSBuild pipeline as this
started with coreos/fedora-coreos-tracker#1653.

This should be removed after the next barrier release, if the newly
produced images are fixed.

See coreos/fedora-coreos-tracker#1771
And coreos/fedora-coreos-tracker#1772
dustymabe added a commit to dustymabe/fedora-coreos-config that referenced this issue Sep 26, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0. This is likely due to some missing scaffolding
in the OSBuild software and definitions that we started using in
[1]. These issues [2] [3] were addressed in [4] for new image
builds, but we still need to fix upgrading systems, which we
do here in this migration script.

Note that we also fix a few files in /boot that were left
unlabeled by `rdcore` [5] while we are in here.

[1] coreos/fedora-coreos-tracker#1653.
[2] coreos/fedora-coreos-tracker#1771
[3] coreos/fedora-coreos-tracker#1772
[4] coreos/coreos-assembler#3885
[5] coreos/fedora-coreos-tracker#1770

Co-authored-by: Dusty Mabe <[email protected]>
dustymabe added a commit to jbtrystram/fedora-coreos-config that referenced this issue Sep 26, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0. This is likely due to some missing scaffolding
in the OSBuild software and definitions that we started using in
[1]. These issues [2] [3] were addressed in [4] for new image
builds, but we still need to fix upgrading systems, which we
do here in this migration script.

Note that we also fix a few files in /boot that were left
unlabeled by `rdcore` [5] while we are in here.

[1] coreos/fedora-coreos-tracker#1653.
[2] coreos/fedora-coreos-tracker#1771
[3] coreos/fedora-coreos-tracker#1772
[4] coreos/coreos-assembler#3885
[5] coreos/fedora-coreos-tracker#1770

Co-authored-by: Dusty Mabe <[email protected]>
dustymabe added a commit to jbtrystram/fedora-coreos-config that referenced this issue Sep 27, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0. This is likely due to some missing scaffolding
in the OSBuild software and definitions that we started using in
[1]. These issues [2] [3] were addressed in [4] for new image
builds, but we still need to fix upgrading systems, which we
do here in this migration script.

Note that we also fix a few files in /boot that were left
unlabeled by `rdcore` [5] while we are in here.

[1] coreos/fedora-coreos-tracker#1653.
[2] coreos/fedora-coreos-tracker#1771
[3] coreos/fedora-coreos-tracker#1772
[4] coreos/coreos-assembler#3885
[5] coreos/fedora-coreos-tracker#1770

Co-authored-by: Dusty Mabe <[email protected]>
dustymabe added a commit to jbtrystram/fedora-coreos-config that referenced this issue Sep 27, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0. This is likely due to some missing scaffolding
in the OSBuild software and definitions that we started using in
[1]. These issues [2] [3] were addressed in [4] for new image
builds, but we still need to fix upgrading systems, which we
do here in this migration script.

Note that we also fix a few files in /boot that were left
unlabeled by `rdcore` [5] while we are in here.

[1] coreos/fedora-coreos-tracker#1653.
[2] coreos/fedora-coreos-tracker#1771
[3] coreos/fedora-coreos-tracker#1772
[4] coreos/coreos-assembler#3885
[5] coreos/fedora-coreos-tracker#1770

Co-authored-by: Dusty Mabe <[email protected]>
dustymabe added a commit to jbtrystram/fedora-coreos-config that referenced this issue Sep 27, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0. This is likely due to some missing scaffolding
in the OSBuild software and definitions that we started using in
[1]. These issues [2] [3] were addressed in [4] for new image
builds, but we still need to fix upgrading systems, which we
do here in this migration script.

Note that we also fix a few files in /boot that were left
unlabeled by `rdcore` [5] while we are in here.

[1] coreos/fedora-coreos-tracker#1653.
[2] coreos/fedora-coreos-tracker#1771
[3] coreos/fedora-coreos-tracker#1772
[4] coreos/coreos-assembler#3885
[5] coreos/fedora-coreos-tracker#1770

Co-authored-by: Dusty Mabe <[email protected]>
dustymabe added a commit to jbtrystram/fedora-coreos-config that referenced this issue Sep 27, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0. This is likely due to some missing scaffolding
in the OSBuild software and definitions that we started using in
[1]. These issues [2] [3] were addressed in [4] for new image
builds, but we still need to fix upgrading systems, which we
do here in this migration script.

Note that we also fix a few files in /boot that were left
unlabeled by `rdcore` [5] while we are in here.

[1] coreos/fedora-coreos-tracker#1653.
[2] coreos/fedora-coreos-tracker#1771
[3] coreos/fedora-coreos-tracker#1772
[4] coreos/coreos-assembler#3885
[5] coreos/fedora-coreos-tracker#1770

Co-authored-by: Dusty Mabe <[email protected]>
dustymabe added a commit to dustymabe/fedora-coreos-config that referenced this issue Sep 27, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0. This is likely due to some missing scaffolding
in the OSBuild software and definitions that we started using in
[1]. These issues [2] [3] were addressed in [4] for new image
builds, but we still need to fix upgrading systems, which we
do here in this migration script.

Note that we also fix a few files in /boot that were left
unlabeled by `rdcore` [5] while we are in here.

[1] coreos/fedora-coreos-tracker#1653.
[2] coreos/fedora-coreos-tracker#1771
[3] coreos/fedora-coreos-tracker#1772
[4] coreos/coreos-assembler#3885
[5] coreos/fedora-coreos-tracker#1770

Co-authored-by: Dusty Mabe <[email protected]>
dustymabe added a commit to jbtrystram/fedora-coreos-config that referenced this issue Sep 27, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0. This is likely due to some missing scaffolding
in the OSBuild software and definitions that we started using in
[1]. These issues [2] [3] were addressed in [4] for new image
builds, but we still need to fix upgrading systems, which we
do here in this migration script.

Note that we also fix a few files in /boot that were left
unlabeled by `rdcore` [5] while we are in here.

[1] coreos/fedora-coreos-tracker#1653.
[2] coreos/fedora-coreos-tracker#1771
[3] coreos/fedora-coreos-tracker#1772
[4] coreos/coreos-assembler#3885
[5] coreos/fedora-coreos-tracker#1770

Co-authored-by: Dusty Mabe <[email protected]>
dustymabe added a commit to coreos/fedora-coreos-config that referenced this issue Sep 27, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0. This is likely due to some missing scaffolding
in the OSBuild software and definitions that we started using in
[1]. These issues [2] [3] were addressed in [4] for new image
builds, but we still need to fix upgrading systems, which we
do here in this migration script.

Note that we also fix a few files in /boot that were left
unlabeled by `rdcore` [5] while we are in here.

[1] coreos/fedora-coreos-tracker#1653.
[2] coreos/fedora-coreos-tracker#1771
[3] coreos/fedora-coreos-tracker#1772
[4] coreos/coreos-assembler#3885
[5] coreos/fedora-coreos-tracker#1770

Co-authored-by: Dusty Mabe <[email protected]>
dustymabe pushed a commit to dustymabe/fedora-coreos-config that referenced this issue Sep 28, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0. This is likely due to some missing scaffolding
in the OSBuild software and definitions that we started using in
[1]. These issues [2] [3] were addressed in [4] for new image
builds, but we still need to fix upgrading systems, which we
do here in this migration script.

Note that we also fix a few files in /boot that were left
unlabeled by `rdcore` [5] while we are in here.

[1] coreos/fedora-coreos-tracker#1653.
[2] coreos/fedora-coreos-tracker#1771
[3] coreos/fedora-coreos-tracker#1772
[4] coreos/coreos-assembler#3885
[5] coreos/fedora-coreos-tracker#1770

Co-authored-by: Dusty Mabe <[email protected]>
(cherry picked from commit 2e355fd)
dustymabe pushed a commit to coreos/fedora-coreos-config that referenced this issue Sep 30, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0. This is likely due to some missing scaffolding
in the OSBuild software and definitions that we started using in
[1]. These issues [2] [3] were addressed in [4] for new image
builds, but we still need to fix upgrading systems, which we
do here in this migration script.

Note that we also fix a few files in /boot that were left
unlabeled by `rdcore` [5] while we are in here.

[1] coreos/fedora-coreos-tracker#1653.
[2] coreos/fedora-coreos-tracker#1771
[3] coreos/fedora-coreos-tracker#1772
[4] coreos/coreos-assembler#3885
[5] coreos/fedora-coreos-tracker#1770

Co-authored-by: Dusty Mabe <[email protected]>
(cherry picked from commit 2e355fd)
dustymabe pushed a commit to dustymabe/fedora-coreos-config that referenced this issue Sep 30, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0. This is likely due to some missing scaffolding
in the OSBuild software and definitions that we started using in
[1]. These issues [2] [3] were addressed in [4] for new image
builds, but we still need to fix upgrading systems, which we
do here in this migration script.

Note that we also fix a few files in /boot that were left
unlabeled by `rdcore` [5] while we are in here.

[1] coreos/fedora-coreos-tracker#1653.
[2] coreos/fedora-coreos-tracker#1771
[3] coreos/fedora-coreos-tracker#1772
[4] coreos/coreos-assembler#3885
[5] coreos/fedora-coreos-tracker#1770

Co-authored-by: Dusty Mabe <[email protected]>
(cherry picked from commit 2e355fd)
dustymabe pushed a commit to coreos/fedora-coreos-config that referenced this issue Oct 1, 2024
/boot/efi and /sysroot dir and subfiles are unlabeled_t since
40.20240504.3.0. This is likely due to some missing scaffolding
in the OSBuild software and definitions that we started using in
[1]. These issues [2] [3] were addressed in [4] for new image
builds, but we still need to fix upgrading systems, which we
do here in this migration script.

Note that we also fix a few files in /boot that were left
unlabeled by `rdcore` [5] while we are in here.

[1] coreos/fedora-coreos-tracker#1653.
[2] coreos/fedora-coreos-tracker#1771
[3] coreos/fedora-coreos-tracker#1772
[4] coreos/coreos-assembler#3885
[5] coreos/fedora-coreos-tracker#1770

Co-authored-by: Dusty Mabe <[email protected]>
(cherry picked from commit 2e355fd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants