-
Notifications
You must be signed in to change notification settings - Fork 182
osbuild: use bootc install to deploy the container #4224
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
base: main
Are you sure you want to change the base?
Conversation
Instead of deploying the container to the tree then copy all the contents to the disk image, use bootc to directly manage the installation to the target filesystems. Right now this requires to use the image as the buildroot so this requires python (for osbuild). This is tracked in [1]. [1] bootc-dev/bootc#1410 Requires osbuild/osbuild#2149
Skipping CI for Draft Pull Request. |
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.
Code Review
The pull request introduces changes to use bootc install to deploy the container, which simplifies the image build process. There are a few critical issues in the YAML manifest related to copy-paste errors that lead to incorrect configurations for the 4k image builds and missing options for loopback
devices. These issues need to be addressed.
partition: | ||
mpp-format-int: '{image4k.layout[''root''].partnum}' | ||
target: / | ||
- name: boot | ||
type: org.osbuild.ext4 | ||
source: disk | ||
partition: | ||
mpp-format-int: '{image4k.layout[''boot''].partnum}' | ||
target: /boot | ||
- type: org.osbuild.copy | ||
inputs: | ||
tree: | ||
type: org.osbuild.tree | ||
origin: org.osbuild.pipeline | ||
references: | ||
- name:tree | ||
options: | ||
paths: | ||
- from: input://tree/ | ||
to: mount://root/ | ||
devices: | ||
disk: | ||
type: org.osbuild.loopback | ||
options: | ||
filename: disk.img | ||
partscan: true | ||
sector-size: | ||
mpp-format-int: "{four_k_sector_size}" | ||
mounts: | ||
- name: root | ||
type: org.osbuild.xfs | ||
source: disk | ||
partition: | ||
mpp-format-int: '{image4k.layout[''root''].partnum}' | ||
mpp-format-int: '{image.layout[''root''].partnum}' | ||
target: / | ||
- name: boot | ||
type: org.osbuild.ext4 | ||
source: disk | ||
partition: | ||
mpp-format-int: '{image4k.layout[''boot''].partnum}' | ||
mpp-format-int: '{image.layout[''boot''].partnum}' | ||
target: /boot | ||
- name: efi | ||
type: org.osbuild.fat | ||
source: disk | ||
partition: | ||
mpp-format-int: '{image4k.layout[''EFI-SYSTEM''].partnum}' | ||
mpp-format-int: '{image.layout[''EFI-SYSTEM''].partnum}' | ||
target: /boot/efi |
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.
The raw-4k-image
pipeline should use the image4k
layout definition. However, the mounts
for the bootc.install-to-filesystem
stage are incorrectly using image.layout
. This appears to be a copy-paste error from the raw-image
pipeline and will cause the 4k image build to fail or be misconfigured.
partition:
mpp-format-int: '{image4k.layout[''root''].partnum}'
target: /
- name: boot
type: org.osbuild.ext4
source: disk
partition:
mpp-format-int: '{image4k.layout[''boot''].partnum}'
target: /boot
- name: efi
type: org.osbuild.fat
source: disk
partition:
mpp-format-int: '{image4k.layout[''EFI-SYSTEM''].partnum}'
target: /boot/efi
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 agree.
source: disk | ||
partition: | ||
mpp-format-int: '{image4k.layout[''root''].partnum}' | ||
mpp-format-int: '{image.layout[''root''].partnum}' | ||
target: / | ||
- name: boot | ||
type: org.osbuild.ext4 | ||
source: disk | ||
partition: | ||
mpp-format-int: '{image4k.layout[''boot''].partnum}' | ||
mpp-format-int: '{image.layout[''boot''].partnum}' | ||
target: /boot |
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.
The mounts
for the ignition
stage in the raw-4k-image
pipeline are incorrectly using image.layout
instead of image4k.layout
. This needs to be corrected to use the image4k
variable to ensure the correct partitions are used for the 4k image build.
partition:
mpp-format-int: '{image4k.layout[''root''].partnum}'
target: /
- name: boot
type: org.osbuild.ext4
source: disk
partition:
mpp-format-int: '{image4k.layout[''boot''].partnum}'
target: /boot
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 agree.
I switched the CI on this to run against |
@jbtrystram: The following test 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-sigs/prow repository. I understand the commands that are listed here. |
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-sigs/prow repository. |
A few diffs picked up by We should probably profile each diff (maybe in coreos/fedora-coreos-tracker#1827) and evaluate whether it's a change we want to make or not. |
I can't get a built qemu image to boot. I suspect probably the root= and boot= UUIDs added on the kernel command line? |
Instead of deploying the container to the tree then copy all the contents to the disk image, use bootc to directly manage the installation to the target filesystems.
Right now this requires to use the image as the buildroot so this requires python (for osbuild). This is tracked in [1].
[1] bootc-dev/bootc#1410 Requires osbuild/osbuild#2149