Files
computer-playbook/.github/workflows/call-test-dns.yml
kevinveenbirkenbachandClaude Opus 5.5 fd596cf188 fix(ci): tear down host AppArmor profiles on GitHub runners like on dev hosts
ubuntu-26.04 runner images load per-binary AppArmor profiles (wg-quick,
dig, who, fusermount3, ~150 upstream). Path-based attachment applies to
every unconfined task, so the profiles also attach inside our privileged
`apparmor=unconfined` containers. The upstream wg-quick profile only allows
`/usr/bin/ip`; on CentOS and Fedora nodes `ip` lives at `/usr/sbin/ip`, so
`svc-net-wireguard : Bring 'data' up` failed with rc=126:

    /usr/bin/wg-quick: line 32: /usr/sbin/ip: Permission denied
    apparmor="DENIED" operation="exec" profile="wg-quick" name="/usr/sbin/ip"

(run 39268090162, Fediwall#0, CentOS swarm VPN).

Dev hosts never see this: `environment-bootstrap` runs
`security-apparmor-teardown`. The runners skipped that preparation. The
deploy, workspace and DNS workflows now run the same target on the runner
host before any container starts (skipped under act, whose job container
cannot reach the host's policy), so CI matches the dev-host state for all
profiles, not only the ones seen so far.

A dedicated permissive profile for the containers was rejected: every
AppArmor host without that profile loaded would refuse to start them,
including dev hosts and act.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-19 22:36:58 +02:00

71 lines
1.9 KiB
YAML

name: "💬 Test: DNS"
on:
workflow_dispatch:
inputs:
distros:
description: "🐧 Space-separated distro list (e.g. 'arch debian ubuntu')"
required: false
default: "debian"
type: string
workflow_call:
inputs:
distros:
description: "Space-separated distro list"
required: true
type: string
permissions:
contents: read
packages: read
jobs:
dns:
name: 🌐 DNS
runs-on: ubuntu-26.04
timeout-minutes: 30
steps:
- name: 🧹 Free disk space
if: ${{ !env.ACT }}
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: ⬇️ Checkout
uses: actions/checkout@v7.0.0
- name: 🛡️ Tear down host AppArmor profiles (dev-host parity)
if: ${{ !env.ACT }}
shell: bash
run: make security-apparmor-teardown
- name: 🔑 Login to GHCR
uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🔍 Resolve image coordinates
shell: bash
run: |
set -euo pipefail
echo "OWNER=$(scripts/meta/resolve/repository/owner.sh)" >> "$GITHUB_ENV"
repo_name="${{ github.repository }}"
repo_name="${repo_name#*/}"
echo "REPO_NAME=${repo_name,,}" >> "$GITHUB_ENV"
- name: 🌐 DNS test per distro (parallel DinD)
shell: bash
env:
GHCR_USER: ${{ github.actor }}
GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./scripts/tests/dns/parallel.sh ${{ inputs.distros }}