You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Exploration: Multi-Distribution E2E Testing for urunc
2
+
3
+
## Objective
4
+
As part of Issue #208, we explored options to expand the E2E test suite to distributions beyond Ubuntu (the default GitHub Actions runner).
5
+
6
+
## Options Explored
7
+
8
+
### 1. GitHub Actions Job Containers
9
+
**Description**: Use the `container:` property in GitHub Actions jobs to run steps inside a specific Docker image (e.g., Fedora, Rocky Linux, OpenSUSE).
10
+
-**Pros**:
11
+
- Natively supported by GitHub Actions.
12
+
- Easy to matrix over different images.
13
+
- Fast setup compared to full VMs.
14
+
-**Cons**:
15
+
- No native `systemd` support in standard containers (requires workarounds for `containerd`).
16
+
- Requires passing `/dev/kvm` and other host devices to the container.
17
+
- Path differences and package manager variations must be handled in scripts.
18
+
19
+
### 2. Vagrant with KVM/QEMU
20
+
**Description**: Use Vagrant to provision full virtual machines on the GHA runner.
21
+
-**Pros**:
22
+
- Full OS isolation with `systemd` and kernel modules.
23
+
- Closest to real-world production environments.
24
+
-**Cons**:
25
+
- Requires nested virtualization support on the runner.
26
+
- Significant overhead and slower execution.
27
+
- Complex setup in GHA (managing providers like libvirt/virtualbox).
28
+
29
+
### 3. Docker-in-Docker (Kind-like approach)
30
+
**Description**: Run tests inside a container that is started via `docker run` from the host, similar to how `kind_test.yml` works.
31
+
-**Pros**:
32
+
- Allows fine-grained control over container options (privileged, volume mounts).
33
+
-**Cons**:
34
+
- Adds an extra layer of abstraction.
35
+
- Scripting becomes more complex (`docker exec` everywhere).
36
+
37
+
## Proposed Implementation (PoC)
38
+
39
+
We chose to implement a **hybrid approach using Job Containers** for simplicity and integration with existing GHA workflows, while adding distro-agnostic logic to the setup scripts.
40
+
41
+
### Implementation Details
42
+
1.**Workflow Matrix**: Updated `.github/workflows/vm_test.yml` to include a `distro` matrix.
43
+
2.**Container Configuration**: Jobs for non-Ubuntu distros use specified container images.
44
+
3.**Distro-Agnostic Setup**:
45
+
- Replaced hardcoded `apt-get` with a logic that detects the package manager (`apt`, `dnf`, `zypper`).
46
+
- Added conditional logic for `systemd` vs. direct process execution for `containerd`.
47
+
- Ensured dependencies like `libseccomp` and `qemu` are correctly mapped to distro-specific package names.
48
+
49
+
## Conclusion
50
+
The Job Container approach provides a good balance between test coverage and complexity. While it requires bypassing `systemd` in some cases, it effectively validates `urunc`'s compatibility with different system libraries and package versions across various Linux distributions.
0 commit comments