GRM-154: Fix Arch Linux rootless Docker: load tun module and pre-configure systemd override #228

Merged
emil merged 0 commits from GRM-154-archlinux-rootless-docker-tun-module into master 2026-07-16 17:39:32 +00:00
Owner

Summary

Fixes rootless Docker setup on Arch Linux failing with Failed to open() /dev/net/tun: No such device.

Vikunja task: GRM-154

Changes

  • Load tun kernel module: On Arch Linux, CONFIG_TUN=m so the module must be loaded explicitly. Added a modprobe task before running dockerd-rootless-setuptool.sh. If modprobe fails (kernel mismatch after pacman -Syu without reboot), warn but don't fail — a reboot will fix it.
  • Pre-configure systemd override: Create the systemd override directory and override.conf BEFORE running the setuptool, so when the setuptool starts docker.service it picks up the pasta network driver instead of defaulting to slirp4netns.
  • Pass env var to setuptool: Also pass DOCKERD_ROOTLESS_ROOTLESSKIT_NET to the setuptool command for belt-and-suspenders coverage.

Root Cause

The tun kernel module was not loaded. The running kernel (7.0.10) didn't match the installed kernel modules (7.0.13) after a pacman -Syu that upgraded the linux package without rebooting. modprobe couldn't find the tun module for the running kernel version.

Verification

  • 218 tests pass, 100% coverage
  • lint-all passes
## Summary Fixes rootless Docker setup on Arch Linux failing with `Failed to open() /dev/net/tun: No such device`. Vikunja task: GRM-154 ## Changes - **Load tun kernel module**: On Arch Linux, CONFIG_TUN=m so the module must be loaded explicitly. Added a modprobe task before running dockerd-rootless-setuptool.sh. If modprobe fails (kernel mismatch after pacman -Syu without reboot), warn but don't fail — a reboot will fix it. - **Pre-configure systemd override**: Create the systemd override directory and override.conf BEFORE running the setuptool, so when the setuptool starts docker.service it picks up the pasta network driver instead of defaulting to slirp4netns. - **Pass env var to setuptool**: Also pass DOCKERD_ROOTLESS_ROOTLESSKIT_NET to the setuptool command for belt-and-suspenders coverage. ## Root Cause The tun kernel module was not loaded. The running kernel (7.0.10) didn't match the installed kernel modules (7.0.13) after a pacman -Syu that upgraded the linux package without rebooting. modprobe couldn't find the tun module for the running kernel version. ## Verification - 218 tests pass, 100% coverage - lint-all passes
emil added 1 commit 2026-07-16 17:13:49 +00:00
fix: load tun module and pre-configure systemd override for Arch rootless Docker
CI / molecule-tests (1) (pull_request) Has been skipped
CI / molecule-tests (3) (pull_request) Has been skipped
CI / molecule-tests (2) (pull_request) Has been skipped
CI / molecule-tests (4) (pull_request) Has been skipped
CI / molecule-tests (6) (pull_request) Has been skipped
CI / molecule-tests (5) (pull_request) Has been skipped
CI / auto-merge (pull_request) Has been skipped
CI / validate (pull_request) Waiting to run
9ccdc4d6dc
- Load the tun kernel module before running dockerd-rootless-setuptool.sh,
  as both slirp4netns and pasta drivers require /dev/net/tun inside a user
  namespace. On Arch Linux CONFIG_TUN=m so the module must be loaded
  explicitly. If modprobe fails (kernel mismatch after pacman -Syu without
  reboot), warn but don't fail — a reboot will fix it.
- Create the systemd override directory and override.conf BEFORE running
  the setuptool, so when the setuptool starts docker.service it picks up
  the pasta network driver instead of defaulting to slirp4netns.
- Pass DOCKERD_ROOTLESS_ROOTLESSKIT_NET env var to the setuptool command
  as well, for belt-and-suspenders coverage.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
emil changed title from GRM-154 fix: load tun module and pre-configure systemd override for Arch rootless Docker to GRM-154: Fix Arch Linux rootless Docker: load tun module and pre-configure systemd override 2026-07-16 17:18:15 +00:00
emil added 1 commit 2026-07-16 17:18:49 +00:00
chore: trigger CI after PR title fix
CI / auto-merge (pull_request) Has been skipped
CI / molecule-tests (2) (pull_request) Waiting to run
CI / molecule-tests (5) (pull_request) Waiting to run
CI / molecule-tests (6) (pull_request) Waiting to run
CI / molecule-tests (1) (pull_request) Waiting to run
CI / molecule-tests (3) (pull_request) Waiting to run
CI / molecule-tests (4) (pull_request) Waiting to run
CI / validate (pull_request) Waiting to run
75d647b7af
emil reviewed 2026-07-16 17:20:14 +00:00
emil left a comment
Author
Owner

Automated PR Review

  • Architecture compliance: OK
  • Best practices: OK
  • Security: OK
  • i18n: OK
  • Resource management: OK
  • Documentation: WARNING — Ansible role changed but no docs updated
  • Tests: OK
  • Commit conventions: OK

No issues found by automated checks.


Auto-merge: If all CI checks pass, this PR will be merged automatically.

## Automated PR Review - Architecture compliance: OK - Best practices: OK - Security: OK - i18n: OK - Resource management: OK - Documentation: WARNING — Ansible role changed but no docs updated - Tests: OK - Commit conventions: OK No issues found by automated checks. --- **Auto-merge:** If all CI checks pass, this PR will be merged automatically.
emil added 1 commit 2026-07-16 17:26:58 +00:00
chore: retrigger CI (flaky apt cache in molecule base image)
CI / molecule-tests (1) (pull_request) Waiting to run
CI / validate (pull_request) Waiting to run
CI / auto-merge (pull_request) Waiting to run
CI / molecule-tests (5) (pull_request) Waiting to run
CI / molecule-tests (6) (pull_request) Waiting to run
CI / molecule-tests (3) (pull_request) Waiting to run
CI / molecule-tests (4) (pull_request) Waiting to run
CI / molecule-tests (2) (pull_request) Waiting to run
a6b366a8b9
emil reviewed 2026-07-16 17:28:26 +00:00
emil left a comment
Author
Owner

Automated PR Review

  • Architecture compliance: OK
  • Best practices: OK
  • Security: OK
  • i18n: OK
  • Resource management: OK
  • Documentation: WARNING — Ansible role changed but no docs updated
  • Tests: OK
  • Commit conventions: OK

No issues found by automated checks.


Auto-merge: If all CI checks pass, this PR will be merged automatically.

## Automated PR Review - Architecture compliance: OK - Best practices: OK - Security: OK - i18n: OK - Resource management: OK - Documentation: WARNING — Ansible role changed but no docs updated - Tests: OK - Commit conventions: OK No issues found by automated checks. --- **Auto-merge:** If all CI checks pass, this PR will be merged automatically.
kireto approved these changes 2026-07-16 17:39:29 +00:00
kireto left a comment
Member

Auto-approved: all CI checks passed (validate, molecule-tests).

Auto-approved: all CI checks passed (validate, molecule-tests).
emil merged commit f6ba60bda6 into master 2026-07-16 17:39:32 +00:00
emil deleted branch GRM-154-archlinux-rootless-docker-tun-module 2026-07-16 17:39:33 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: oblachno-oss/grm#228