fix(manifest-server): bind to :: for dual-stack support#1001
fix(manifest-server): bind to :: for dual-stack support#1001Johannes Würbach (johanneswuerbach) wants to merge 1 commit intoairbytehq:mainfrom
:: for dual-stack support#1001Conversation
The Dockerfile's CMD hardcoded `--host 0.0.0.0`, which only binds the IPv4 wildcard address. On dual-stack Kubernetes clusters that allocate IPv6 pod IPs (or pure-IPv6 clusters), the kubelet probes the pod's IPv6 IP for liveness/readiness — Uvicorn doesn't accept those connections, the pod fails health checks, and ends up in CrashLoopBackOff. Switching to `--host ::` binds the IPv6 wildcard. On Linux, an IPv6 listener on `::` accepts both IPv6 connections and IPv4-mapped connections by default (unless `IPV6_V6ONLY=1`), so this is a strict superset of the prior behavior — single-stack IPv4 clusters keep working and dual-stack / IPv6-preferred clusters start working. Repro on EKS with `ipFamilies: [IPv6, IPv4]` (IPv6 first): pod is allocated an IPv6 IP only, liveness probe to /health fails with `connection refused`, pod restarts every ~60s. Tested locally: dual-stack bind verified via `ss -tlnp`.
10be46c to
1e7f971
Compare
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 59 minutes and 3 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe uvicorn host binding in the manifest server Dockerfile is changed from IPv4-only ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates manifest-server’s container entrypoint to bind Uvicorn to the IPv6 wildcard address so it can accept kubelet probes on IPv6-only / IPv6-preferred Kubernetes clusters.
Changes:
- Switch Uvicorn bind host from
0.0.0.0(IPv4-only) to::(dual-stack on typical Linux defaults). - Add inline Dockerfile rationale explaining the Kubernetes probe failure mode and why
::resolves it.
Comments suppressed due to low confidence (1)
airbyte_cdk/manifest_server/Dockerfile:48
- The note about "unless
IPV6_V6ONLYis set" is a bit ambiguous:IPV6_V6ONLYis a socket option (and on Linux can also be influenced vianet.ipv6.bindv6only), not something typically "set" as an env var. Consider rewording to explicitly reference the socket option / sysctl to avoid confusion for readers.
CMD ["uvicorn", "airbyte_cdk.manifest_server.app:app", "--host", "::", "--port", "8080"]
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What
Change
manifest-server's Uvicorn bind from--host 0.0.0.0to--host ::inairbyte_cdk/manifest_server/Dockerfile.Why
The Dockerfile's CMD hardcoded
--host 0.0.0.0, which only binds the IPv4 wildcard address. On dual-stack Kubernetes clusters that allocate IPv6 pod IPs (or pure-IPv6 clusters), the kubelet probes the pod's IPv6 IP for liveness/readiness — Uvicorn doesn't accept those connections, the pod fails health checks, and ends up inCrashLoopBackOff.Switching to
--host ::binds the IPv6 wildcard. On Linux, an IPv6 listener on::accepts both IPv6 connections and IPv4-mapped connections by default (unlessIPV6_V6ONLY=1), so this is a strict superset of the prior behavior — single-stack IPv4 clusters keep working and dual-stack / IPv6-preferred clusters start working.Repro
EKS cluster with
ipFamilies: [IPv6, IPv4](IPv6 first):2600:1f18:2090:c503:1190::15).Uvicorn running on http://0.0.0.0:8080.http://[<pod-ipv6>]:8080/healthreturnsconnection refused.initialDelaySeconds+ 30s of failed probes, kubelet sends SIGTERM → graceful shutdown → restart loop.After this change, the same cluster sees
Uvicorn running on http://[::]:8080and the liveness probe succeeds.Notes
airbyte/manifest-server:7.10.0from the chart V2 / Airbyte v2.1.0 release.airbyte_cdk/manifest_server/cli/_start.pyalready supports--hostoverrides for the local-dev path.Summary by CodeRabbit