-
Notifications
You must be signed in to change notification settings - Fork 236
Add support for ubuntu noble #188
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
Merged
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
e0785c1
Use matrix with parametrized ci.yaml for future os upgrades
mpenny-github 4a524ec
Potential fix for pull request finding
mpenny-github aaf989c
Enfore that the docker container should use amd64 version (even when …
mpenny-github ab35fa7
Create containerized testing framework
mpenny-github 3bbf390
Update the Dockerfile with the requirements for running in a container
mpenny-github e2fb5d3
Update python tests with python3 syntax
mpenny-github 0225418
Add tcpdump to Dockerfile. Skip tests that can't be run locally
mpenny-github 443be59
Resolve: ValueError: must have exactly one of create/read/write/appen…
mpenny-github 0c1cb03
Add goflags for builds. Skip tests that can't be run outside vagrant
mpenny-github eea8fe2
Debug director-xdp failure
mpenny-github 91a8672
Use the renamed L2ListenSocket object. Ensure that XDP program is det…
mpenny-github 23a51d6
Use HOSTPATH
mpenny-github 75e859a
Improve glb-director teardown when run on action
mpenny-github 1335bc6
Remove the test file that is not needed. Handle scapy teardown better
mpenny-github 85f5c95
Remove dpdk-rte-kni-dkms
mpenny-github 711d628
Replace EOL nose with pytest
mpenny-github d3e6594
First draft of Dockerfile.noble
mpenny-github 7e458d2
Build compatability between focal and noble
mpenny-github 419c02f
Improvements from copilot
mpenny-github 8a2426e
Run build and test for noble in github action
mpenny-github 0189ff4
BPF compatability in ubuntu noble
mpenny-github 89a776b
Fix the makepath for glb-director-cli dependency in glb-director-xdp
mpenny-github f7a6957
Update the glb-director-xdp makefile to use a kernel agnostic path fo…
mpenny-github 303faee
Update the xdp BPF structs for compatability with noble
mpenny-github e3a0e2c
Exclude noble director from test
mpenny-github ccdfa21
Add build artifacts to .gitignore, better handling in glb_test_util.py
mpenny-github 41ee404
Add pytest.ini for glb-redirect
mpenny-github 9181172
Remove usused import. Write to devnull to avoid deadlock
mpenny-github 91802ca
Merge remote-tracking branch 'origin/containerized_test_suite' into u…
mpenny-github 12187af
Merge remote-tracking branch 'origin/master' into use_pytest
mpenny-github 6c9423d
Merge remote-tracking branch 'origin/master' into noble_support
mpenny-github 5c5e078
Merge remote-tracking branch 'origin/master' into use_pytest
mpenny-github 45ca6cb
Remove conflict markers
mpenny-github b2a3918
Conflict marker
mpenny-github 1f3a066
Code review feedback
mpenny-github ad53941
Merge remote-tracking branch 'origin/use_pytest' into noble_support
mpenny-github 0ed7784
Get DKMS via https
mpenny-github 4bb3646
Close file in cli_tool
mpenny-github b02932c
Merge remote-tracking branch 'origin/use_pytest' into noble_support
mpenny-github c1b6b73
Open test-config.bin with a with so it always closes
mpenny-github 886500a
Merge remote-tracking branch 'origin/use_pytest' into noble_support
mpenny-github d21badf
Merge remote-tracking branch 'origin/master' into noble_support
mpenny-github 37be92d
Use signed package for dkms
mpenny-github 1304ee4
Define debug with explicit initializer
mpenny-github ed4e898
Use libbpf for the distro
mpenny-github f5e54de
Make GLB_SKIP_DPDK_DIRECTOR checks explicitly verify the value is '1
mpenny-github File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,23 @@ | ||
| # Set GLB_SKIP_DPDK_DIRECTOR=1 to skip building the DPDK glb-director package. | ||
| # In that mode we still build glb-director-cli (a runtime dep of glb-director-xdp) | ||
| # via GLB_CLI_ONLY=1. This is used on distros where DPDK 17 / KNI is unavailable | ||
| # (e.g. Ubuntu noble). | ||
| GLB_SKIP_DPDK_DIRECTOR ?= | ||
|
|
||
| mkdeb: | ||
| make -C src/glb-redirect mkdeb | ||
| make -C src/glb-healthcheck mkdeb | ||
| cd src/glb-director-xdp && script/create-packages | ||
| ifeq ($(GLB_SKIP_DPDK_DIRECTOR),1) | ||
| cd src/glb-director && GLB_CLI_ONLY=1 script/create-packages | ||
| else | ||
| cd src/glb-director && script/create-packages | ||
| endif | ||
|
|
||
| clean: | ||
| make -C src/glb-redirect clean | ||
| make -C src/glb-healthcheck clean | ||
| ifneq ($(GLB_SKIP_DPDK_DIRECTOR),1) | ||
| make -C src/glb-director clean | ||
| endif | ||
| make -C src/glb-director/cli clean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| FROM --platform=linux/amd64 ubuntu:noble@sha256:c4a8d5503dfb2a3eb8ab5f807da5bc69a85730fb49b5cfca2330194ebcc41c7b | ||
|
|
||
| ARG DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| RUN apt-get update && apt-get -y install curl git | ||
|
|
||
| # Build deps for glb-director-cli and glb-director-xdp. | ||
| # Note: we do NOT install DPDK on noble. The DPDK-based glb-director is only | ||
| # built on focal; on noble the supported forwarder is glb-director-xdp. | ||
| RUN apt-get update && apt-get install --assume-yes \ | ||
| build-essential \ | ||
| wget \ | ||
| pkg-config \ | ||
| libjansson-dev \ | ||
| libsystemd-dev | ||
|
|
||
| # iptables / DKMS | ||
| RUN apt-get update | ||
| RUN apt-get install --assume-yes --fix-broken \ | ||
| wget \ | ||
| pkg-config \ | ||
| libsystemd-dev \ | ||
| dkms \ | ||
| dh-dkms \ | ||
| dpkg-dev \ | ||
| fakeroot \ | ||
| debhelper \ | ||
| libxtables-dev | ||
|
|
||
| # noble's dkms 3.x dropped `dkms mkdeb`, which the glb-redirect Makefile needs | ||
| # (template-dkms-mkdeb + `dkms mkdeb --source-only`). Restore it by extracting | ||
| # focal's dkms 2.x alongside 3.x and shimming `dkms mkdeb` to the legacy binary. | ||
| # | ||
| # We `apt-get download` the focal dkms from a GPG-verified focal source (full | ||
| # apt chain of trust, no hardcoded/unverified URL). The focal pockets are | ||
| # pinned below noble's so they're only used for this download, never installs. | ||
| RUN set -eux; \ | ||
| keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg; \ | ||
| printf 'deb [signed-by=%s] http://archive.ubuntu.com/ubuntu focal main\ndeb [signed-by=%s] http://archive.ubuntu.com/ubuntu focal-updates main\n' "$keyring" "$keyring" > /etc/apt/sources.list.d/focal-dkms.list; \ | ||
| printf 'Package: *\nPin: release n=focal\nPin-Priority: 100\n\nPackage: *\nPin: release n=focal-updates\nPin-Priority: 100\n' > /etc/apt/preferences.d/focal-dkms.pref; \ | ||
| apt-get update; \ | ||
| # Sanity check: the focal pin must not change the dkms candidate (stays 3.x). | ||
| case "$(apt-cache policy dkms | awk '/Candidate:/{print $2}')" in 3.*) : ;; *) echo "ERROR: dkms candidate changed by focal pin" >&2; exit 1 ;; esac; \ | ||
| cd /tmp; \ | ||
| apt-get download dkms/focal-updates; \ | ||
| deb="$(ls dkms_*_all.deb)"; \ | ||
| dpkg-deb -x "$deb" /tmp/dkms-focal; \ | ||
| cp -r /tmp/dkms-focal/etc/dkms/template-dkms-mkdeb /etc/dkms/template-dkms-mkdeb; \ | ||
| install -m 0755 /tmp/dkms-focal/usr/sbin/dkms /usr/sbin/dkms-legacy; \ | ||
| rm -rf /tmp/dkms-focal "/tmp/$deb"; \ | ||
| # Remove the temporary focal source + pin so they don't linger in the image. | ||
| rm -f /etc/apt/sources.list.d/focal-dkms.list /etc/apt/preferences.d/focal-dkms.pref; \ | ||
| apt-get update; \ | ||
| printf '#!/bin/sh\nif [ "$1" = "mkdeb" ]; then exec /usr/sbin/dkms-legacy "$@"; fi\nexec /usr/sbin/dkms.real "$@"\n' > /usr/local/bin/dkms; \ | ||
| chmod 0755 /usr/local/bin/dkms; \ | ||
| mv /usr/sbin/dkms /usr/sbin/dkms.real | ||
|
mpenny-github marked this conversation as resolved.
|
||
|
|
||
| # golang | ||
| RUN ARCH=$(dpkg --print-architecture) && wget --quiet https://golang.org/dl/go1.24.5.linux-${ARCH}.tar.gz -O- | tar -C /usr/local -zxvf - | ||
| ENV GOROOT /usr/local/go | ||
| ENV GOPATH /go | ||
| ENV GOFLAGS=-buildvcs=false | ||
| ENV PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}" | ||
|
|
||
|
|
||
| # fpm for packaging | ||
| RUN apt-get update && apt-get install -y ruby ruby-dev rubygems build-essential | ||
|
|
||
| # See fpm dependency breakage issue: https://github.com/jordansissel/fpm/issues/1918 | ||
| RUN gem install --version 2.7.6 dotenv | ||
| RUN gem install ffi -f | ||
| RUN gem install rake fpm | ||
|
|
||
| # XDP | ||
| # linux-libc-dev must be upgraded to get a bpf.h that matches what we use. the rest match what we do in Vagrant for testing. | ||
| RUN apt-get update && apt install -y apt-transport-https curl software-properties-common | ||
| RUN apt-get update && apt install -y iproute2 libbpf-dev linux-libc-dev clang-20 clang-tools-20 | ||
|
|
||
| # The xdp bpf/Makefile defaults CLANG/LLC to clang-10/llc-10 (focal). On noble | ||
| # we ship clang-20 instead, so steer the BPF build at it. | ||
| ENV CLANG=clang-20 | ||
| ENV LLC=llc-20 | ||
|
mpenny-github marked this conversation as resolved.
|
||
|
|
||
|
|
||
| # Hack because the kernel headers are not installed in the right place (linuxkit vs generic) | ||
| RUN ln -s /usr/src/$(ls /usr/src/ | grep generic) /usr/src/linux-headers-$(uname -r) | ||
|
|
||
| # Hack for C99 math | ||
| RUN sed -i '1s/^/#define __USE_C99_MATH\n/' /usr/src/$(ls /usr/src/ | grep generic)/include/linux/kasan-checks.h | ||
| RUN sed -i '2s/^/#include <stdbool.h>\n/' /usr/src/$(ls /usr/src/ | grep generic)/include/linux/kasan-checks.h | ||
|
|
||
| # Newer kernel headers (6.8 in noble) added linux/kcsan-checks.h which uses | ||
| # `size_t` without pulling stddef.h, breaking the bpf clang build. Inject a | ||
| # stddef.h up front, mirroring the kasan-checks.h hack above. | ||
| RUN sed -i '1s|^|#include <stddef.h>\n|' /usr/src/$(ls /usr/src/ | grep generic)/include/linux/kcsan-checks.h | ||
|
|
||
|
|
||
| # Python test dependencies (scapy/pytest etc.) used by the test suites. | ||
| RUN apt-get update && apt-get install -y python3 python3-pip python3-dev | ||
| COPY requirements.txt /tmp/requirements.txt | ||
| RUN pip3 install --no-cache-dir --break-system-packages -r /tmp/requirements.txt | ||
|
|
||
| # valgrind is required by the glb-director test suite | ||
| RUN apt-get update && apt-get install -y valgrind | ||
|
|
||
| # netcat and jq are required by the glb-healthcheck test suite | ||
| RUN apt-get update && apt-get install -y netcat-openbsd jq tcpdump | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't love this solution, but I found it preferable to building with the full dh_dkms:
noble_support...remove_glb_redirect_dkms_backport