Skip to content

Add hostconfig inspect dirty #10

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
280 changes: 140 additions & 140 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
- runner: ubuntu-24.04
containerd: v2.0.2
arch: amd64
- runner: arm64-8core-32gb
containerd: v2.0.2
arch: arm64
# - runner: arm64-8core-32gb
# containerd: v2.0.2
# arch: arm64
env:
CONTAINERD_VERSION: "${{ matrix.containerd }}"
ARCH: "${{ matrix.arch }}"
Expand Down Expand Up @@ -94,129 +94,129 @@ jobs:
- name: "Run unit tests"
run: make test-unit

test-integration:
needs: build-dependencies
timeout-minutes: 30
name: rootful | ${{ matrix.containerd }} | ${{ matrix.runner }}
runs-on: "${{ matrix.runner }}"
strategy:
fail-fast: false
matrix:
# ubuntu-20.04: cgroup v1, ubuntu-22.04 and later: cgroup v2
include:
- ubuntu: 20.04
containerd: v1.6.36
runner: "ubuntu-20.04"
arch: amd64
- ubuntu: 22.04
containerd: v1.7.25
runner: "ubuntu-22.04"
arch: amd64
- ubuntu: 24.04
containerd: v2.0.2
runner: "ubuntu-24.04"
arch: amd64
- ubuntu: 24.04
containerd: v2.0.2
runner: arm64-8core-32gb
arch: arm64
env:
CONTAINERD_VERSION: "${{ matrix.containerd }}"
ARCH: "${{ matrix.arch }}"
UBUNTU_VERSION: "${{ matrix.ubuntu }}"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: "Expose GitHub Runtime variables for gha"
uses: crazy-max/ghaction-github-runtime@b3a9207c0e1ef41f4cf215303c976869d0c2c1c4 # v3.0.0
- name: "Prepare integration test environment"
run: |
docker buildx create --name with-gha --use
docker buildx build \
--output=type=docker \
--cache-from type=gha,scope=${ARCH}-${CONTAINERD_VERSION} \
-t test-integration --target test-integration --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} --build-arg CONTAINERD_VERSION=${CONTAINERD_VERSION} .
- name: "Remove snap loopback devices (conflicts with our loopback devices in TestRunDevice)"
run: |
sudo systemctl disable --now snapd.service snapd.socket
sudo apt-get purge -y snapd
sudo losetup -Dv
sudo losetup -lv
- name: "Register QEMU (tonistiigi/binfmt)"
run: |
# `--install all` will only install emulation for architectures that cannot be natively executed
# Since some arm64 platforms do provide native fallback execution for 32 bits,
# armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
# To avoid that, we explicitly list the architectures we do want emulation for.
docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
- name: "Run integration tests"
run: docker run -t --rm --privileged test-integration ./hack/test-integration.sh -test.only-flaky=false
- name: "Run integration tests (flaky)"
run: docker run -t --rm --privileged test-integration ./hack/test-integration.sh -test.only-flaky=true
# test-integration:
# needs: build-dependencies
# timeout-minutes: 30
# name: rootful | ${{ matrix.containerd }} | ${{ matrix.runner }}
# runs-on: "${{ matrix.runner }}"
# strategy:
# fail-fast: false
# matrix:
# # ubuntu-20.04: cgroup v1, ubuntu-22.04 and later: cgroup v2
# include:
# - ubuntu: 20.04
# containerd: v1.6.36
# runner: "ubuntu-20.04"
# arch: amd64
# # - ubuntu: 22.04
# # containerd: v1.7.25
# # runner: "ubuntu-22.04"
# # arch: amd64
# - ubuntu: 24.04
# containerd: v2.0.2
# runner: "ubuntu-24.04"
# arch: amd64
# # - ubuntu: 24.04
# # containerd: v2.0.2
# # runner: arm64-8core-32gb
# # arch: arm64
# env:
# CONTAINERD_VERSION: "${{ matrix.containerd }}"
# ARCH: "${{ matrix.arch }}"
# UBUNTU_VERSION: "${{ matrix.ubuntu }}"
# steps:
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# with:
# fetch-depth: 1
# - name: "Expose GitHub Runtime variables for gha"
# uses: crazy-max/ghaction-github-runtime@b3a9207c0e1ef41f4cf215303c976869d0c2c1c4 # v3.0.0
# - name: "Prepare integration test environment"
# run: |
# docker buildx create --name with-gha --use
# docker buildx build \
# --output=type=docker \
# --cache-from type=gha,scope=${ARCH}-${CONTAINERD_VERSION} \
# -t test-integration --target test-integration --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} --build-arg CONTAINERD_VERSION=${CONTAINERD_VERSION} .
# - name: "Remove snap loopback devices (conflicts with our loopback devices in TestRunDevice)"
# run: |
# sudo systemctl disable --now snapd.service snapd.socket
# sudo apt-get purge -y snapd
# sudo losetup -Dv
# sudo losetup -lv
# - name: "Register QEMU (tonistiigi/binfmt)"
# run: |
# # `--install all` will only install emulation for architectures that cannot be natively executed
# # Since some arm64 platforms do provide native fallback execution for 32 bits,
# # armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
# # To avoid that, we explicitly list the architectures we do want emulation for.
# docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
# docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
# docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
# - name: "Run integration tests"
# run: docker run -t --rm --privileged test-integration ./hack/test-integration.sh -test.only-flaky=false
# - name: "Run integration tests (flaky)"
# run: docker run -t --rm --privileged test-integration ./hack/test-integration.sh -test.only-flaky=true

test-integration-ipv6:
needs: build-dependencies
timeout-minutes: 15
name: ipv6 | ${{ matrix.containerd }} | ${{ matrix.ubuntu }}
runs-on: "ubuntu-${{ matrix.ubuntu }}"
strategy:
fail-fast: false
matrix:
include:
- ubuntu: 24.04
containerd: v2.0.2
arch: amd64
env:
CONTAINERD_VERSION: "${{ matrix.containerd }}"
ARCH: "${{ matrix.arch }}"
UBUNTU_VERSION: "${{ matrix.ubuntu }}"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: Enable ipv4 and ipv6 forwarding
run: |
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo sysctl -w net.ipv4.ip_forward=1
- name: "Expose GitHub Runtime variables for gha"
uses: crazy-max/ghaction-github-runtime@b3a9207c0e1ef41f4cf215303c976869d0c2c1c4 # v3.0.0
- name: Enable IPv6 for Docker, and configure docker to use containerd for gha
run: |
sudo mkdir -p /etc/docker
echo '{"ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64", "experimental": true, "ip6tables": true}' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
- name: "Prepare integration test environment"
run: |
docker buildx create --name with-gha --use
docker buildx build \
--output=type=docker \
--cache-from type=gha,scope=${ARCH}-${CONTAINERD_VERSION} \
-t test-integration --target test-integration --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} --build-arg CONTAINERD_VERSION=${CONTAINERD_VERSION} .
- name: "Remove snap loopback devices (conflicts with our loopback devices in TestRunDevice)"
run: |
sudo systemctl disable --now snapd.service snapd.socket
sudo apt-get purge -y snapd
sudo losetup -Dv
sudo losetup -lv
- name: "Register QEMU (tonistiigi/binfmt)"
run: |
# `--install all` will only install emulation for architectures that cannot be natively executed
# Since some arm64 platforms do provide native fallback execution for 32 bits,
# armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
# To avoid that, we explicitly list the architectures we do want emulation for.
docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
- name: "Run integration tests"
# The nested IPv6 network inside docker and qemu is complex and needs a bunch of sysctl config.
# Therefore, it's hard to debug why the IPv6 tests fail in such an isolation layer.
# On the other side, using the host network is easier at configuration.
# Besides, each job is running on a different instance, which means using host network here
# is safe and has no side effects on others.
run: docker run --network host -t --rm --privileged test-integration ./hack/test-integration.sh -test.only-ipv6
# test-integration-ipv6:
# needs: build-dependencies
# timeout-minutes: 15
# name: ipv6 | ${{ matrix.containerd }} | ${{ matrix.ubuntu }}
# runs-on: "ubuntu-${{ matrix.ubuntu }}"
# strategy:
# fail-fast: false
# matrix:
# include:
# - ubuntu: 24.04
# containerd: v2.0.2
# arch: amd64
# env:
# CONTAINERD_VERSION: "${{ matrix.containerd }}"
# ARCH: "${{ matrix.arch }}"
# UBUNTU_VERSION: "${{ matrix.ubuntu }}"
# steps:
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# with:
# fetch-depth: 1
# - name: Enable ipv4 and ipv6 forwarding
# run: |
# sudo sysctl -w net.ipv6.conf.all.forwarding=1
# sudo sysctl -w net.ipv4.ip_forward=1
# - name: "Expose GitHub Runtime variables for gha"
# uses: crazy-max/ghaction-github-runtime@b3a9207c0e1ef41f4cf215303c976869d0c2c1c4 # v3.0.0
# - name: Enable IPv6 for Docker, and configure docker to use containerd for gha
# run: |
# sudo mkdir -p /etc/docker
# echo '{"ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64", "experimental": true, "ip6tables": true}' | sudo tee /etc/docker/daemon.json
# sudo systemctl restart docker
# - name: "Prepare integration test environment"
# run: |
# docker buildx create --name with-gha --use
# docker buildx build \
# --output=type=docker \
# --cache-from type=gha,scope=${ARCH}-${CONTAINERD_VERSION} \
# -t test-integration --target test-integration --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} --build-arg CONTAINERD_VERSION=${CONTAINERD_VERSION} .
# - name: "Remove snap loopback devices (conflicts with our loopback devices in TestRunDevice)"
# run: |
# sudo systemctl disable --now snapd.service snapd.socket
# sudo apt-get purge -y snapd
# sudo losetup -Dv
# sudo losetup -lv
# - name: "Register QEMU (tonistiigi/binfmt)"
# run: |
# # `--install all` will only install emulation for architectures that cannot be natively executed
# # Since some arm64 platforms do provide native fallback execution for 32 bits,
# # armv7 emulation may or may not be installed, causing variance in the result of `uname -m`.
# # To avoid that, we explicitly list the architectures we do want emulation for.
# docker run --privileged --rm tonistiigi/binfmt --install linux/amd64
# docker run --privileged --rm tonistiigi/binfmt --install linux/arm64
# docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7
# - name: "Run integration tests"
# # The nested IPv6 network inside docker and qemu is complex and needs a bunch of sysctl config.
# # Therefore, it's hard to debug why the IPv6 tests fail in such an isolation layer.
# # On the other side, using the host network is easier at configuration.
# # Besides, each job is running on a different instance, which means using host network here
# # is safe and has no side effects on others.
# run: docker run --network host -t --rm --privileged test-integration ./hack/test-integration.sh -test.only-ipv6

test-integration-rootless:
needs: build-dependencies
Expand All @@ -233,21 +233,21 @@ jobs:
rootlesskit: v1.1.1 # Deprecated
target: rootless
arch: amd64
- ubuntu: 22.04
containerd: v1.7.25
rootlesskit: v2.3.2
target: rootless
arch: amd64
- ubuntu: 24.04
containerd: v2.0.2
rootlesskit: v2.3.2
target: rootless
arch: amd64
- ubuntu: 24.04
containerd: v1.7.25
rootlesskit: v2.3.2
target: rootless-port-slirp4netns
arch: amd64
# - ubuntu: 22.04
# containerd: v1.7.25
# rootlesskit: v2.3.2
# target: rootless
# arch: amd64
# - ubuntu: 24.04
# containerd: v2.0.2
# rootlesskit: v2.3.2
# target: rootless
# arch: amd64
# - ubuntu: 24.04
# containerd: v1.7.25
# rootlesskit: v2.3.2
# target: rootless-port-slirp4netns
# arch: amd64
env:
CONTAINERD_VERSION: "${{ matrix.containerd }}"
ARCH: "${{ matrix.arch }}"
Expand Down
Loading
Loading