Skip to content

Upgrading Build Environment to Ubuntu 24.04#12795

Merged
ejona86 merged 1 commit intogrpc:masterfrom
kannanjgithub:ubuntu-version-bump
May 5, 2026
Merged

Upgrading Build Environment to Ubuntu 24.04#12795
ejona86 merged 1 commit intogrpc:masterfrom
kannanjgithub:ubuntu-version-bump

Conversation

@kannanjgithub
Copy link
Copy Markdown
Contributor

1. Transition to Ubuntu 24.04
Ubuntu 18.04 has reached End-of-Life (EOL), making standard package repositories unreliable. More critically, legacy versions like 18.04 and 20.04 lack modern root SSL certificates required to securely communicate with internal build infrastructure, leading to handshake failures. Moving to Ubuntu 24.04 provides a modern baseline with updated certificate stores that trust required mirrors out-of-the-box.

2. Mandatory Use of Internal Mirrors
The Kokoro grpc-ubuntu22 worker pool operates under strict egress restrictions that block connections to public Ubuntu archives (e.g., archive.ubuntu.com), resulting in Connection failed errors. To bypass this firewall, we must redirect apt traffic to the internal Google mirror (mirror.bazel.build) using a sed command in the Dockerfile.

3. Bumping JDK to Version 11
Ubuntu 24.04 no longer includes the ancient openjdk-8-jdk in its default repositories. To ensure compatibility with the new OS and maintain a supportable toolchain, we have bumped the version to openjdk-11-jdk.

4. Transition from pkg-config to pkgconf
Following modern Debian/Ubuntu packaging standards, we have replaced pkg-config with pkgconf which is the preferred, actively maintained implementation for package discovery in newer Ubuntu releases.

1. Transition to Ubuntu 24.04
Ubuntu 18.04 has reached End-of-Life (EOL), making standard package repositories unreliable. More critically, legacy versions like 18.04 and 20.04 lack modern root SSL certificates required to securely communicate with internal build infrastructure, leading to handshake failures. Moving to Ubuntu 24.04 provides a modern baseline with updated certificate stores that trust required mirrors out-of-the-box.

2. Mandatory Use of Internal Mirrors
The Kokoro grpc-ubuntu22 worker pool operates under strict egress restrictions that block connections to public Ubuntu archives (e.g., archive.ubuntu.com), resulting in Connection failed errors. To bypass this firewall, we must redirect apt traffic to the internal Google mirror (mirror.bazel.build) using a sed command in the Dockerfile.

3. Bumping JDK to Version 11
Ubuntu 24.04 no longer includes the ancient openjdk-8-jdk in its default repositories. To ensure compatibility with the new OS and maintain a supportable toolchain, we have bumped the version to openjdk-11-jdk.

4. Transition from pkg-config to pkgconf
Following modern Debian/Ubuntu packaging standards, we have replaced pkg-config with pkgconf which is the preferred, actively maintained implementation for package discovery in newer Ubuntu releases.
@kannanjgithub kannanjgithub requested a review from ejona86 May 5, 2026 13:52
Copy link
Copy Markdown
Member

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

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

The grpc-java-artifacts images must use the oldest supported glibc version, as that version becomes part of the binary and you can't run it on a distro with an older glibc version. Ubuntu 18.04 Bionic had glibc 2.27.

So we check RHEL/AlmaLinux, Debian, and Ubuntu for the oldest still-supported release and then find which one has the oldest glibc version. multiarch exists because the centos version of linux was too old to do a proper job for cross-compiling aarch64 and powerpc (and RHEL is generally a bigger pain for cross compiling). Same for ubuntu2004 with s390x. (It was only when I upgraded to AlmaLinux 8 that actually made Dockerfile (almalinux:8) newer than Dockerfile.multiarch.base (ubuntu:1804))

We'll want to support:

  • Ubuntu 22.04 Jammy (libc 2.35). Although note that Ubuntu 20.04 Focal (libc 2.31) servers are still available (because it is in a super-long security period)
  • Debian 12 Bookworm (libc 2.36). Debian 11 dies in Aug 2026, so little point in making effort to continue supporting it
  • RHEL/AlmaLinux 8 (libc 2.28 via rpm -qa glibc)

So that means we need to use RHEL/AlmaLinux 8, as that has the oldest glibc version. But that will take some amount of work to use EPEL packages for cross compilation. That would allow using a single container for all platforms (we can delete multiarch and ubuntu2004 Dockerfiles).

But right now we need the build working again (even if we can't do releases). So swapping to Ubuntu 20.04 would have been my choice, but Ubuntu 24.04 can be fine too since it has already been tested to work. (But we may need to revert some changes later.)

@ejona86 ejona86 merged commit da98b04 into grpc:master May 5, 2026
17 checks passed
@ejona86
Copy link
Copy Markdown
Member

ejona86 commented May 5, 2026

Filed #12797 to fix the glibc version.

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.

3 participants