Repository navigation
DRIVERS-3720 Pin only the mongodb-runner config server to the IPv4 loopback - #933
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for restoring localhost defaults while retaining the config-server-specific IPv4 override.
No open issues 🎉
What changed in this PR
Restores localhost for driver-facing deployments while retaining the config-server-only IPv4 workaround that prevents sharded startup hangs. This addresses the driver-test regressions introduced by PR #922’s global IPv4 pin.
Changes:
- Uses
localhostby default, overriding only the sharded config server to127.0.0.1. - Updates unit tests to verify the default host and config-server override.
- Adds integration assertions that rendered connection strings advertise
localhost, not127.0.0.1.
| File | Description |
|---|---|
.evergreen/tests/test-mongodb-runner.sh |
Checks advertised hosts in rendered connection strings. |
.evergreen/orchestration/test_drivers_orchestration.py |
Verifies default and config-server-specific host settings. |
.evergreen/orchestration/mongodb_runner.py |
Limits the IPv4 pin to the sharded config server. |
Review effort: Balanced
| # mongos pins the first address "localhost" resolves to (::1 here), | ||
| # which an IPv4-only config server does not listen on, so start | ||
| # hangs (DRIVERS-3720). Shard 0 is always the config server; drop | ||
| # the pin once fixed upstream. |
Collaborator
There was a problem hiding this comment.
Is there an upstream issue we can link here?
Member
Author
There was a problem hiding this comment.
DRIVERS-3720 is the tracking issue, this PR is a workaround
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DRIVERS-3720
Summary
mongodb-runner 8.4.5 applies the configured host to the config server, so a dual-stack mongos pins
::1for--configdbagainst an IPv4-only config server and start never returns (DRIVERS-3720). PR #922 pinned every server to127.0.0.1, breaking driver tests that assume the loopback name (CDRIVER-6558, with the same fallout in C# and Rust).Changes in this PR
localhostas the advertised host for every topology.127.0.0.1(the pre-8.4.5 carve-out).MONGODB_URIadvertiseslocalhost.Test Plan
python -m unittest test_drivers_orchestrationpasses 28/28, including two new tests for the host config.::1-first host: sharded start returns in ~22s; the naivelocalhostrevert hangs and the DRIVERS-3673 Fix mongodb-runner dropping mongod server logs after startup #922 pin advertises127.0.0.1./TOPOLOGY/reconcile/from_handshake: fails against a127.0.0.1deployment, passes againstlocalhost.Checklist
Checklist for Author
Checklist for Reviewer