feat: Support this role in container builds#212
feat: Support this role in container builds#212martinpitt merged 4 commits intolinux-system-roles:mainfrom
Conversation
|
The initial run failed due to a runcontainer.sh bug, fixed in linux-system-roles/tox-lsr#189. Re-running. Now it locally fails in the "right" way: This now happens in CI as well. |
3d52046 to
cf7e00f
Compare
|
In classic rpm mode, tests_port2 fails without a "fatal:". This makes the log harder to evaluate. It fails due to I fixed that in an extra commit here, I sent it to linux-system-roles/.github#103 as well. Beyond that I'll ignore that error. Running the classic rpm OSes in containers is nice while I develop |
cf7e00f to
ef73805
Compare
|
Better! Some tests pass. packages_full and port fail in the firewalld rule, so I suppose that will be my next target. The certificate tests still need work. Update: I added a |
ef73805 to
4d9f357
Compare
4d9f357 to
4d18ffc
Compare
366a6a6 to
5e77f17
Compare
5e77f17 to
07e9a10
Compare
07e9a10 to
439e11c
Compare
Generalize qemu-kvm-integration-tests.yml to run some "container-*" environments as well. For "classic rpm" OSes that does not give us too much beyond making sure that the container tests actually work (developers might use them locally, after all). 90% of the logic (setup, compatibility check, status updates, etc.) is the same, so it's not economic to duplicate all of that into a new workflow. Add Fedora/CentOS *-bootc scenarios: These check that our role works during a bootc container build, without any systemd, processes, or other runtime environment. tox-lsr added support for this in linux-system-roles/tox-lsr#188. However, as most roles don't currently work in that environment, introduce and check a new `containerbuild` tag in meta/main.yml. We'll add this to roles as we adjust them. Similarly, as not every role works in a running container (e.g. due to assuming SELinux), check a new `container` tag in their tests. See https://issues.redhat.com/browse/RHEL-78157
Cause: Both the actual role and the tests were previously assuming that the system was booted with systemd and could run services. But this is not the case when running the role during container builds. Consequence: The role did not work during bootc container builds. Fix: Detect if the system is booted (with systemd), and skip all runtime operations and checks if not. Result: The role now works during container builds. Add a config file only test to tests_port.yml to cover container runs, as all the other assertions depend on cockpit running. Skip the certmonger tests for non-booted environments, as certmonger requires a running system by design (these are a case for running the role in a deployed system). Also skip the firewall managed related checks for the time being, until the firewall role works during container builds (https://issues.redhat.com/browse/RHEL-88425). https://issues.redhat.com/browse/RHEL-88423
Feature: Support running the cockpit role during container builds. Reason: This is particularly useful for building bootc derivative OSes. Result: These flags enable running the bootc container scenarios in CI, which ensures that the role works in buildah build environment. This allows us to officially support this role for image mode builds. Do *not* enable the role for system containers (the `container`) flag. That currently fails due to SELinux not working properly there, and needs to be looked at separately if desired. https://issues.redhat.com/browse/RHEL-88423
439e11c to
8b319a5
Compare
Feature: Support running the cockpit role during container builds.
Reason: This is particularly useful for building bootc derivative OSes.
Result: These flags enable running the bootc container scenarios in CI, which ensures that the role works in buildah build environment. This allows us to officially support this role for image mode builds.
Do not enable the role for system containers (the
container) flag. That currently fails due to SELinux not working properly there, and needs to be looked at separately if desired.https://issues.redhat.com/browse/RHEL-88423
Skip the certmonger tests for non-booted environments, as certmonger requires a running system by design (these are a case for running the role in a deployed system). Also skip the firewall managed related checks for the time being, until the firewall role works during container builds (https://issues.redhat.com/browse/RHEL-88425).