Skip to content

Add support for running glb-director on ubuntu noble#181

Draft
mpenny-github wants to merge 74 commits into
masterfrom
mpenny_noble_build
Draft

Add support for running glb-director on ubuntu noble#181
mpenny-github wants to merge 74 commits into
masterfrom
mpenny_noble_build

Conversation

@mpenny-github
Copy link
Copy Markdown
Contributor

@mpenny-github mpenny-github commented Apr 1, 2026

The primary change from the PR is to add build and runtime support for glb-director on ubuntu noble.
The existing test suite is designed to run on a vagrant VM. This PR also updates the test suite to run inside a docker container on github actions.

  1. Update .github/workflows/ci.yml to run the CI builds for ubuntu noble and focal in parallel.
  2. Add a new .github/workflows/test.yml to run the tests suite that currently runs in a vagrant VM in a container on github actions.
  3. Update script/helpers/folding.sh so that it using github action style grouping for messages rather than the legacy janky (?) format.
  4. Update script/cibuild-create-packages to take an argument for the distro that it will be building for.
  5. Remove script/cibuild-create-packages-focal in favor of the parameterized version (4.)
  6. Update script/Dockerfile.focal to ensure that clang-tools are included.
  7. Create script/Dockerfile.noble for builds on ubuntu noble.
  8. Create a platform agnostic script/test that detects and uses the correct version of scan-build.
  9. Source code and makefile changes to add support for running on ubuntu noble.

Comment thread script/cibuild-create-packages-noble Outdated

begin_fold "Preparing Docker build environment"
(
docker build -t glb-director-build-noble -f script/Dockerfile.noble script
Copy link
Copy Markdown
Contributor

@fjaeckel fjaeckel Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
docker build -t glb-director-build-noble -f script/Dockerfile.noble script
docker build -t glb-director-build -f script/Dockerfile.noble script

instead of copying the whole script, can we please move towards a parameterized version of it to pass the OS flavor as a argument and make this more dynamic?

Copy link
Copy Markdown
Contributor

@fjaeckel fjaeckel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move towards a parameterised version of cibuild for choosing the OS flavor

Comment thread .github/workflows/test.yml Fixed
Comment thread .github/workflows/test.yml Fixed
Comment thread .github/workflows/test.yml Fixed
Comment thread .github/workflows/test.yml Fixed
Comment thread .github/workflows/test.yml Fixed
Comment thread .github/workflows/test.yml Fixed
Make 'script/cibuild-create-packages focal' and
'script/cibuild-create-packages noble' both succeed by adding
compatibility shims for DPDK 23.11 (Noble) while keeping the existing
DPDK 17.11 (Focal) build working.

Build system:
- src/glb-director/Makefile: detect the legacy DPDK make fragments;
  when absent (Noble), fall back to a pkg-config based build that
  produces build/app/glb-director.
- src/glb-redirect/Makefile: detect /etc/dkms/template-dkms-mkdeb at
  runtime. On Focal use the legacy 'dkms mkdeb --source-only' path.
  On Noble dispatch to a new mkdeb-dh-dkms target that synthesises a
  minimal debian/ tree (control, changelog, rules, source/format,
  .dkms, .install) and runs dpkg-buildpackage with dh-dkms, producing
  the same glb-redirect-iptables-dkms_<ver>_all.deb artifact.
- script/Dockerfile.noble: add dh-dkms, dpkg-dev, and fakeroot for the
  modern packaging path.

DPDK 23.11 source compatibility:
- main.c: gate <rte_kni.h> with __has_include; switch
  rte_eth_dev_count() to GLB_ETH_DEV_COUNT(); guard pre-22.11 rxmode
  fields (header_split / hw_ip_checksum / hw_vlan_filter /
  jumbo_frame / hw_strip_crc) with RTE_VERSION; define and register
  glb_mbuf_userdata_offset when GLB_HAVE_MBUF_USERDATA_DYNFIELD is set.
- glb_kni.c: gate the whole file on GLB_HAVE_KNI (KNI was removed in
  DPDK 23.11) and provide no-op stubs for the public glb_kni_* API in
  the disabled branch.
- bind_classifier.c: include config.h before bind_classifier_rules.h
  so the ipv4_hdr/ipv6_hdr -> rte_* aliases are visible to the rule
  table definitions.
- cmdline_parse.c: introduce CMDLINE_CTX() macro to use
  cmdline_get_ctx() on DPDK >= 22.11 (struct cmdline became opaque).

C hygiene fixes surfaced by newer toolchain:
- log.h: add include guard and change 'bool debug;' to extern; the
  single definition now lives in shared_opt.c. Fixes multiple-
  definition link errors on newer GCC defaults (-fno-common).
- strlcpy.h: add header guard to prevent the static inline strlcpy
  from being declared twice when included via multiple paths.

Both 'script/cibuild-create-packages focal' and
'script/cibuild-create-packages noble' now exit 0 and produce the
expected .deb artifacts (glb-director-cli, glb-director, glb-director-
xdp, xdp-root-shim, glb-healthcheck, glb-redirect-iptables-dkms).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants