-
Notifications
You must be signed in to change notification settings - Fork 168
tmt: Fix var-mount test to use booted container image #1927
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
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
This pull request refactors the test-install-to-filesystem-var-mount.sh script to align with best practices for TMT tests and bootc image testing. The changes correctly switch from pulling a remote image to using the locally booted container image via bootc image copy-to-storage. It also streamlines the test by removing unnecessary host modifications like SELinux enforcement, usr-overlay, and dnf install commands. Furthermore, the root logical volume is now configured to use 100%FREE space, enhancing test robustness. The addition of a bind mount for /usr/lib/bootc/bound-images.d effectively disables logically bound images, matching the described intent. Overall, these changes improve the test's accuracy, efficiency, and maintainability.
| # Run bootc install to-filesystem | ||
| # This should succeed and handle the separate /var mount correctly | ||
| # Run bootc install to-filesystem from within the container image under test | ||
| # The bind mount of /usr/share/empty to /usr/lib/bootc/bound-images.d disables LBIs |
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.
Yeah...but that would be really likely to break if we changed how we handle LBIs.
And in the future I think bootc fsck or equiv should error out on this.
So if LBIs are a problem here we need to make a derived image which drops them.
|
|
||
| # Use a generic target image to test skew between the bootc binary doing | ||
| # the install and the target image | ||
| TARGET_IMAGE="docker://quay.io/centos-bootc/centos-bootc:stream10" |
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.
Ah yes the "not actually testing the code one built" is a super easy to hit problem in what we're doing...
Use copy-to-storage to add the booted container to podman storage instead of pulling a remote image. This matches the pattern used by other TMT tests and ensures we test the actual bootc under test. Changes: - Use localhost/bootc from copy-to-storage instead of remote image - Disable LBIs via bind mount of /usr/share/empty - Remove unnecessary host modifications (usr-overlay, dnf install, etc.) - Use 100%FREE for root LV to ensure sufficient space for deployment Assisted-by: OpenCode (Opus 4.5) Signed-off-by: ckyrouac <[email protected]>
3d005d2 to
859dfbe
Compare
| fi | ||
| rm -vrf /usr/lib/bootupd/updates | ||
| rm -vrf /usr/lib/bootc/bound-images.d | ||
| # Build a derived image that removes LBIs |
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 I meant to ask before also - why are we doing this? How do LBIs relate to this issue?
Is it about saving disk space?
Use copy-to-storage to add the booted container to podman storage instead of pulling a remote image. This matches the pattern used by other TMT tests and ensures we test the actual bootc under test.
Changes:
Assisted-by: OpenCode (Opus 4.5)