Skip to content

fix(server): pin resolved advertise address - #251

Open
zhikunyao wants to merge 1 commit into
masterfrom
fix/resolve-advertise-ip-before-memberlist
Open

fix(server): pin resolved advertise address#251
zhikunyao wants to merge 1 commit into
masterfrom
fix/resolve-advertise-ip-before-memberlist

Conversation

@zhikunyao

Copy link
Copy Markdown

Summary

  • retain the IP returned by the existing advertise-hostname readiness check
  • pass the stable IP to memberlist instead of resolving the hostname a second time
  • add a regression test covering hostname-to-IP pinning before node startup

Root cause

waitAndStartCurrentNode waited until the configured gossip advertise hostname resolved, but discarded the resolved IP. membership.NewServerNode then performed another DNS lookup. During Kubernetes Headless Service propagation, that second lookup could fail after the readiness lookup had succeeded, leaving a partially initialized memberlist listener and causing subsequent retries to report address already in use.

Test plan

  • go test -race -short ./server ./common/net ./common/membership -count=1
  • go test -run '^$' ./...
  • gofmt -d server/service.go server/service_test.go
  • git diff --check

Signed-off-by: Zhikun Yao <zhikun.yao@zilliz.com>
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.59%. Comparing base (e99c5e6) to head (8e19423).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #251      +/-   ##
==========================================
- Coverage   83.62%   83.59%   -0.04%     
==========================================
  Files         182      182              
  Lines       25452    25453       +1     
==========================================
- Hits        21285    21277       -8     
- Misses       3189     3193       +4     
- Partials      978      983       +5     
Components Coverage Δ
Server 83.07% <100.00%> (+<0.01%) ⬆️
Client 90.42% <ø> (-0.13%) ⬇️
Meta 86.99% <ø> (ø)
Common 88.70% <ø> (-0.04%) ⬇️
Files with missing lines Coverage Δ
server/service.go 79.39% <100.00%> (+0.02%) ⬆️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown

E2E Service failed. Comment /rerun-e2e-service to rerun, or /rerun to rerun all failed checks.

@github-actions

Copy link
Copy Markdown

Component Integration Test failed. Comment /rerun-component-test to rerun, or /rerun to rerun all failed checks.

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.

1 participant