Skip to content

Commit

Permalink
With latest Ubuntu 20.04 GitHub Actions runner image 20240609.1.0, cg…
Browse files Browse the repository at this point in the history
…roups v1 no longer work, stop testing on them.
  • Loading branch information
adelton committed Jun 12, 2024
1 parent 5ed5219 commit 5fbd808
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 50 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,47 +197,6 @@ jobs:
if: ${{ failure() }}
run: tests/run-partial-tests.sh Dockerfile.${{ matrix.os }}

test-docker-20-04-cgroups-v1:
name: Run with docker on Ubuntu 20.04 with forced cgroups v1
runs-on: ubuntu-20.04
needs: [ build ]
strategy:
fail-fast: false
matrix:
include:
- os: fedora-40
readonly: --read-only
- os: centos-9-stream
readonly: --read-only
- os: centos-7
protected_regular: unset
- os: rhel-7
protected_regular: unset
env:
CGROUP_UNIFIED_IGNORE: 1
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: freeipa-server-${{ matrix.os }}
- name: Decrypt artifacts that were encrypted after build
uses: ./.github/actions/decrypt-file
if: ${{ startsWith(matrix.os, 'rhel-') }}
with:
file: freeipa-server-${{ matrix.os }}.tar.gz
secret: ${{ secrets.UPLOAD_SECRET }}
- name: Load image
run: gunzip < freeipa-server-${{ matrix.os }}.tar.gz | docker load
- name: Disable fs.protected_regular
if: ${{ matrix.protected_regular == 'unset' }}
run: sudo sysctl fs.protected_regular=0
- name: Run master and replica
run: readonly=${{ matrix.readonly }} ca=${{ matrix.ca }} seccomp=${{ matrix.seccomp }} replica=${{ matrix.replica }} tests/run-master-and-replica.sh localhost/freeipa-server:${{ matrix.os }}
- name: Run partial tests
if: ${{ failure() }}
run: tests/run-partial-tests.sh Dockerfile.${{ matrix.os }}

test-podman:
name: Run with sudo podman 4
runs-on: ubuntu-22.04
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/run-partial-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
echo "matrix={'os': [ 'fedora-rawhide', 'fedora-40', 'fedora-39', 'centos-9-stream', 'rocky-9', 'rocky-8', 'almalinux-9' ], \
'docker': [ 'docker', 'podman' ], \
'include': [ \
{ 'os': 'centos-7', 'docker': 'docker', 'runs-on': 'ubuntu-20.04', 'cgroup-unified-ignore': '1', 'protected_regular': 'unset' }, \
{ 'os': 'rhel-9', 'docker': 'podman' }, \
{ 'os': 'rhel-8', 'docker': 'podman' } \
] \
Expand Down Expand Up @@ -66,4 +65,4 @@ jobs:
org: ${{ secrets.REDHAT_ORG }}
activationkey: ${{ secrets.REDHAT_ACTIVATIONKEY }}
- name: Run partial tests
run: CGROUP_UNIFIED_IGNORE=${{ matrix.cgroup-unified-ignore }} docker=${{ matrix.docker }} tests/run-partial-tests.sh Dockerfile.${{ matrix.os }}
run: docker=${{ matrix.docker }} tests/run-partial-tests.sh Dockerfile.${{ matrix.os }}
5 changes: 1 addition & 4 deletions tests/run-master-and-replica.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,8 @@ function run_ipa_container() {
fi
else
# cgroup v1
if [ -e /sys/fs/cgroup/unified ] && [ "$CGROUP_UNIFIED_IGNORE" != 1 ] ; then
if [ -e /sys/fs/cgroup/unified ] ; then
OPTS="-v /sys/fs/cgroup/unified:/sys/fs/cgroup:rw"
else
OPTS="-v /sys/fs/cgroup:/sys/fs/cgroup:ro"
fi
fi
OPTS="$OPTS --sysctl net.ipv6.conf.all.disable_ipv6=0"
Expand Down Expand Up @@ -155,7 +153,6 @@ if [ -f /sys/fs/cgroup/cgroup.controllers ] \
&& $docker info --format '{{ .ClientInfo.Context }}' | grep -q rootless ; then
skip_opts=--skip-mem-check
elif [ -e /sys/fs/cgroup/unified ] \
&& [ "$CGROUP_UNIFIED_IGNORE" != 1 ] \
&& [ "$docker" == docker ] ; then
skip_opts=--skip-mem-check
fi
Expand Down
4 changes: 1 addition & 3 deletions tests/run-partial-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ function run_and_wait_for () {
fi
else
# cgroup v1
if [ -e /sys/fs/cgroup/unified ] && [ "$CGROUP_UNIFIED_IGNORE" != 1 ] ; then
if [ -e /sys/fs/cgroup/unified ] ; then
OPTS="$OPTS -v /sys/fs/cgroup/unified:/sys/fs/cgroup:rw"
else
OPTS="$OPTS -v /sys/fs/cgroup:/sys/fs/cgroup:ro"
fi
fi
fi
Expand Down

0 comments on commit 5fbd808

Please sign in to comment.