-
Notifications
You must be signed in to change notification settings - Fork 35
ci: Two prerequisites for bootc support #270
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
Conversation
Reviewer's GuideThis PR prepares for bootc support by converting all permanent firewall operations in the test suites to use firewall-offline-cmd, refactoring conflicting-service disable tasks for container compatibility, and adding guarded reload steps that only invoke firewall-cmd --reload on booted systems. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #270 +/- ##
==========================================
- Coverage 61.09% 60.56% -0.54%
==========================================
Files 2 2
Lines 910 923 +13
==========================================
+ Hits 556 559 +3
- Misses 354 364 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your 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.
Hey @martinpitt - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Review instructions: all looks good
- 🟢 Testing: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
We are only interested in the permanent configuration anyway, so we can drop the "firewalld is running" assumption and use `firewall-offline-cmd` instead to query the on-disk state directly. This also works in container builds.
|
[citest] |
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.
Hey @martinpitt - I've reviewed your changes - here's some feedback:
- Instead of using custom shell conditionals for
--set-default-zone, leverage Ansible’s built-in idempotence (e.g.changed_whenor a dedicated module parameter) to avoid brittle shell logic. - The tests still directly invoke
firewall-cmd --reload; wrap those reload steps in the same boot-check guard you added elsewhere or centralize reload into a single task to ensure consistency. - In tasks/main.yml you manually parse
systemctl is-enabled—you can simplify by using a singlesystemdmodule call withenabled: falseandstate: stoppedto handle disabling and stopping services in one go.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Review instructions: all looks good
- 🟢 Testing: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
I'm not sure how this works to simply swap |
The only places that use All other places have |
…ments Cause: The `firewall_disable_conflicting_services` option did not work in container build environments, as Ansible's `service_facts` completely fail there. Consequence: Running the role with that option during e.g. a bootc image build errored out with "Failed to find any services". Fix: The role only actually needs to know about the status of a small list of known conflicting services. Query these with `systemctl is-enabled` which works fine in container builds. Drop the obsolete `service_mgr == 'systemd'` check. All our supported platforms run systemd, and we don't test anything else.
|
[citest] |
These are two prerequisites for eventual bootc build support. They are tested in my bootc-container-test branch, and so far these parts work fine. These two commits are fairly intrusive but conceptually simple, so it may make sense to already land them. I also want to make sure that it doesn't break any of the qemu/TF tests.
Summary by Sourcery
Prepare for bootc build support by migrating tests to offline mode and enhancing service handling.
Enhancements: