fix(database): force PgBouncer DNS over TCP - #4135
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe three CloudNativePG PgBouncer pooler manifests now configure pod DNS with the ChangesPooler DNS Configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)kubernetes/apps/database/cloudnative-pg/cluster/pooler-ro.yamlTraceback (most recent call last): kubernetes/apps/database/cloudnative-pg/cluster/pooler-session.yamlTraceback (most recent call last): kubernetes/apps/database/cloudnative-pg/cluster/pooler.yamlTraceback (most recent call last): Comment |
@@ spec.template.spec @@
# postgresql.cnpg.io/v1/Pooler/database/pgbouncer-rw
! + one map entry added:
+ dnsConfig:
+ options:
+ - name: use-vc
@@ spec.template.spec @@
# postgresql.cnpg.io/v1/Pooler/database/pgbouncer-ro
! + one map entry added:
+ dnsConfig:
+ options:
+ - name: use-vc
@@ spec.template.spec @@
# postgresql.cnpg.io/v1/Pooler/database/pgbouncer-session
! + one map entry added:
+ dnsConfig:
+ options:
+ - name: use-vc
|
AI Automated ReviewAnalysis engine: qwen-3.6-fast@http://litellm.ai.svc.cluster.local/v1 (openai) RecommendationApprove. This is a small, targeted fix that adds Change-by-change findings
All three files already contain resource requests/limits and topology spread constraints; this addition does not alter those settings. The indentation matches the surrounding YAML (6 spaces for Standards Compliance
Unknowns or Needs Verification
|
Reverts e4e3645 (#4135). It was added to force PgBouncer DNS over TCP, but PgBouncer never uses TCP for DNS here. Observed across three pooler pods on two nodes, sampled every 2s for 50s: exactly one connected UDP socket to 10.43.0.10:53 and zero TCP sockets to :53, socket inode unchanged throughout. pgbouncer 1.25.1 resolves through libcares 1.34.5. The option is not inert, though: it applies to every other process in the pod. The pooler's pid 1 is the Go /controller/manager, and Go's net dnsconfig parser honours use-vc, as does glibc NSS. Under the CoreDNS reply drops fixed in #4147 TCP is the worse transport, because a denied SYN,ACK wedges the caller through the full TCP SYN retry ladder while a dropped UDP reply retries in 1-2s. So this removes an aggravating factor, not dead config. Note the mechanism by which c-ares ignores use-vc is not established: c-ares 1.34.5 does parse the option and pgbouncer never passes ARES_OPT_FLAGS to override it. The socket observation is the evidence, not a source-level explanation.
Summary
postgres16-rwValidation
git diff --checkmise exec -- flate test all— 278 passedSummary by CodeRabbit