-
Notifications
You must be signed in to change notification settings - Fork 135
examples: Add bootc UKI & BLS examples #1614
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
b3c5bad
to
f8b1745
Compare
tmt/plans/bootc-integration.fmf
Outdated
test: | ||
- /tmt/tests/test-24-local-upgrade-reboot | ||
|
||
/test-26-examples-build: |
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'm not totally sold on testing this way. This was the result of asking claude to write a test to make sure the examples build. Is it too heavyweight to go through the matrix of spawning VMs with tmt just to sanity check the examples work?
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.
(At the very least if we do it via tmt we need to add it to the list of tests in the github workflow)
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.
(At the very least if we do it via tmt we need to add it to the list of tests in the github workflow)
I added this at least for the moment just to see it run and see what happens...
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.
Yes, it's messy to build containers inside a tmt test, and we definitely want to make it easy to build it outside of such a test too.
But OTOH, I think it's totally fine to do it this way as is right now. BTW though this will just conflict with #1607 - what we're going to need to do is at least have a separate tmt "plan" for tests which are testing booting via bootc vs testing the build side.
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.
Well first order of business...
./tmt-test-wrapper-inner.sh-tmt-tests-test-26-examples-build-1-default-0-default-0: line 6: cd: examples/bootc-bls: No such file or directory
Guess it's time to learn what path tomfoolery is going on in tmt
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.
Maybe also a good point to go on a side quest and finally learn what nushell is all about...
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'm kind of regretting nushell a bit because IME ai models are more likely to confabulate with it. But writing nontrivial amounts of bash sucks.
One issue is TMT really pushes for having tests be interpreted code, but maybe we could mitigate that. There's obviously a ton of interpreted options, from python to ansible.
Ideally though for me, tests are like production code:
- in a static compiled language (nushell is at least partially static)
- actors operate autonomously instead of having logic pushed to them
But anyways for what's going on here, bash is probably OK...
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 it was less "rewrite this tiny bash snippet in nushell" and moreso "most everything else is in nushell so I should probably at least understand how everything else works"
f8b1745
to
8de031c
Compare
examples/bootc-bls/extra/usr/lib/dracut/dracut.conf.d/37composefs.conf
Outdated
Show resolved
Hide resolved
8de031c
to
92cab58
Compare
--security-opt label=type:unconfined_t \ | ||
"${IMAGE}" \ | ||
bootc install to-disk \ | ||
--composefs-native \ |
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.
Right now bcvk doesn't allow passing arbitrary flags; we can add that of course, but I do think we should be aiming to move this to an install flag or autodetection instead.
Signed-off-by: Timothée Ravier <[email protected]>
Signed-off-by: Timothée Ravier <[email protected]>
Signed-off-by: Timothée Ravier <[email protected]>
Update bootc examples to use the new unified bootc command interface: - Replace cfsctl binary with bootc and use 'bootc internals cfs' subcommands - Rename composefs-setup-root to bootc-initramfs-setup - Update dracut module from 37composefs to 37bootc - Remove sudo requirement from podman build commands - Update service and module configuration files accordingly 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> Signed-off-by: John Eckersberg <[email protected]>
Add test-26-examples-build to validate that the bootc-bls and bootc-uki example build scripts work correctly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> Signed-off-by: John Eckersberg <[email protected]>
Doing this as a distinct commit so as to not conflate future modifications with the bulk code movement. Signed-off-by: John Eckersberg <[email protected]>
As we progress the composefs work along this is becoming more of a general requirement. I think it still makes sense to leave it as optional for now, but I think for the bulk of the cases we'll want to go ahead and build the initramfs support in. Signed-off-by: John Eckersberg <[email protected]>
By default bootc will enable fsverity when ext4 is the chosen filesystem, and we need fsverity to do composefs testing. Signed-off-by: John Eckersberg <[email protected]>
Since we're running this under tmt, the "system" bootc binaries were built from source and injected into the integration disk image. No need to rebuild these inside of the test job itself. Signed-off-by: John Eckersberg <[email protected]>
92cab58
to
1bfae10
Compare
Added some commits here, tried to break it up so everything was self-explanatory in its intentions. Tests are finally passing for me locally so I suspect this should pass and be ready for review. |
Hm looks like |
🤔 |
Rebirth of #1533 targeting
main
after thecomposefs-backend
branch was merged.