Skip to content

deploy: prefer IPv4 in glibc DNS resolution#6626

Merged
jyotshnayaparla-00 merged 1 commit into
mainfrom
fix/dns-precedence-ipv4-feldera-dev-image
Jul 14, 2026
Merged

deploy: prefer IPv4 in glibc DNS resolution#6626
jyotshnayaparla-00 merged 1 commit into
mainfrom
fix/dns-precedence-ipv4-feldera-dev-image

Conversation

@jyotshnayaparla-00

Copy link
Copy Markdown
Contributor

Node.js-based GHA actions (e.g. setup-uv) hang and time out fetching raw.githubusercontent.com on our EKS runners, which have no IPv6 routing but still get an AAAA record back. glibc's getaddrinfo tries that IPv6 result first and only falls back to IPv4 after the OS-level timeout.

Fixing this in the feldera-dev image itself (via /etc/gai.conf) applies to every environment that uses it, instead of patching NODE_OPTIONS per-cluster in each ArgoCD-managed runner/job-hook config.

Node.js-based GHA actions (e.g. setup-uv) hang and time out fetching
raw.githubusercontent.com on our EKS runners, which have no IPv6
routing but still get an AAAA record back. glibc's getaddrinfo tries
that IPv6 result first and only falls back to IPv4 after the OS-level
timeout.

Fixing this in the feldera-dev image itself (via /etc/gai.conf)
applies to every environment that uses it, instead of patching
NODE_OPTIONS per-cluster in each ArgoCD-managed runner/job-hook config.
@jyotshnayaparla-00 jyotshnayaparla-00 self-assigned this Jul 13, 2026

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

APPROVE — clean single-line fix in the right layer.

Adding precedence ::ffff:0:0/96 100 to /etc/gai.conf is the canonical glibc knob for "prefer IPv4 on dual-stack hosts that lack v6 routing" (RFC 3484 §2.1 / §10.3). Default precedence gives IPv4-mapped addresses 35 and native IPv6 40, so IPv6 wins; raising the mapped bucket to 100 flips it. This is exactly what other projects with IPv6-broken environments do, and doing it once in the base image is strictly better than smearing NODE_OPTIONS=--dns-result-order=ipv4first across ArgoCD manifests.

Notes, non-blocking:

  • >> is right here — the Debian/Ubuntu /etc/gai.conf ships with the RFC 3484 block fully commented, so appending the uncommented line wins without shadowing anything real.
  • The comment above the RUN accurately describes the failure mode; leaving that in-image is worth it because whoever inherits from feldera-dev will thank the next person who wonders why v4 is preferred.
  • This affects DNS resolution for every glibc-linked program in the image (not just Node), which is the intent, but worth remembering the day someone reports "curl now picks IPv4 in a v6-happy environment." At that point add an env-driven opt-out; for now, YAGNI.

@jyotshnayaparla-00
jyotshnayaparla-00 requested a review from gz July 13, 2026 19:04
@jyotshnayaparla-00
jyotshnayaparla-00 added this pull request to the merge queue Jul 14, 2026
Merged via the queue into main with commit af0a72b Jul 14, 2026
1 check passed
@jyotshnayaparla-00
jyotshnayaparla-00 deleted the fix/dns-precedence-ipv4-feldera-dev-image branch July 14, 2026 23:21
@gz

gz commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

this is the wrong dockerfile I'll revert this because the impact in any customer deployment with this is unclear
it probably needs to go in Dockerfile.build, but if you switch to use a feldera-dev as image it already has uv preinstalled anyways so you dont need to download anything

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