deploy: prefer IPv4 in glibc DNS resolution#6626
Conversation
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.
mythical-fred
left a comment
There was a problem hiding this comment.
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.confships 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-devwill 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.
|
this is the wrong dockerfile I'll revert this because the impact in any customer deployment with this is unclear |
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.