-
Notifications
You must be signed in to change notification settings - Fork 245
DRIVERS-2224 Fix load-balanced DNS seedlist discovery tests for new dedicated lb port. #1148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
durran
merged 1 commit into
mongodb:master
from
matthewdale:drivers1983-fix-dns-seed-lb-test
Mar 3, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,9 @@ replica set name ``repl0``. | |
|
||
The tests in the ``load-balanced`` directory MUST be executed against a | ||
load-balanced sharded cluster with the mongos servers running on localhost ports | ||
27017 and 27018 (corresponding to the script in `drivers-evergreen-tools`_). The | ||
load balancers, shard servers, and config servers may run on any open ports. | ||
27017 and 27018 and ``--loadBalancerPort`` 27050 and 27051, respectively | ||
(corresponding to the script in `drivers-evergreen-tools`_). The load balancers, | ||
shard servers, and config servers may run on any open ports. | ||
|
||
.. _`drivers-evergreen-tools`: https://github.com/mongodb-labs/drivers-evergreen-tools/blob/master/.evergreen/run-load-balancer.sh | ||
|
||
|
@@ -56,7 +57,9 @@ these tests:: | |
_mongodb._tcp.test19.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc. | ||
_mongodb._tcp.test20.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc. | ||
_mongodb._tcp.test21.test.build.10gen.cc. 86400 IN SRV 27017 localhost.test.build.10gen.cc. | ||
_customname._tcp.test22.test.build.10gen.cc 86400 IN SRV 27017 localhost.test.build.10gen.cc | ||
_customname._tcp.test22.test.build.10gen.cc 86400 IN SRV 27017 localhost.test.build.10gen.cc. | ||
_mongodb._tcp.test23.test.build.10gen.cc. 86400 IN SRV 8000 localhost.test.build.10gen.cc. | ||
_mongodb._tcp.test24.test.build.10gen.cc. 86400 IN SRV 8000 localhost.test.build.10gen.cc. | ||
|
||
Record TTL Class Text | ||
test5.test.build.10gen.cc. 86400 IN TXT "replicaSet=repl0&authSource=thisDB" | ||
|
@@ -68,12 +71,18 @@ these tests:: | |
test11.test.build.10gen.cc. 86400 IN TXT "replicaS" "et=rep" "l0" | ||
test20.test.build.10gen.cc. 86400 IN TXT "loadBalanced=true" | ||
test21.test.build.10gen.cc. 86400 IN TXT "loadBalanced=false" | ||
|
||
Note that ``test4`` is omitted deliberately to test what happens with no SRV | ||
record. ``test9`` is missing because it was deleted during the development of | ||
the tests. The missing ``test.`` sub-domain in the SRV record target for | ||
``test12`` is deliberate. ``test22`` is used to test a custom service name | ||
(``customname``). | ||
test24.test.build.10gen.cc. 86400 IN TXT "loadBalanced=true" | ||
|
||
Notes: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for cleaning up. |
||
|
||
- ``test4`` is omitted deliberately to test what happens with no SRV record. | ||
- ``test9`` is missing because it was deleted during the development of the | ||
tests. | ||
- The missing ``test.`` sub-domain in the SRV record target for ``test12`` is | ||
deliberate. | ||
- ``test22`` is used to test a custom service name (``customname``). | ||
- ``test23`` and ``test24`` point to port 8000 (HAProxy) and are used for | ||
load-balanced tests. | ||
|
||
In our tests we have used ``localhost.test.build.10gen.cc`` as the domain, and | ||
then configured ``localhost.test.build.10gen.cc`` to resolve to 127.0.0.1. | ||
|
6 changes: 3 additions & 3 deletions
6
source/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-directConnection.json
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
10 changes: 5 additions & 5 deletions
10
source/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-directConnection.yml
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
2 changes: 1 addition & 1 deletion
2
...ce/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-replicaSet-errors.json
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
4 changes: 2 additions & 2 deletions
4
source/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-replicaSet-errors.yml
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
6 changes: 3 additions & 3 deletions
6
source/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-true-txt.json
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
8 changes: 4 additions & 4 deletions
8
source/initial-dns-seedlist-discovery/tests/load-balanced/loadBalanced-true-txt.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
uri: "mongodb+srv://test20.test.build.10gen.cc/" | ||
uri: "mongodb+srv://test24.test.build.10gen.cc/" | ||
seeds: | ||
- localhost.test.build.10gen.cc:27017 | ||
- localhost.test.build.10gen.cc:8000 | ||
hosts: | ||
# In LB mode, the driver does not do server discovery, so the hostname does | ||
# not get resolved to localhost:27017. | ||
- localhost.test.build.10gen.cc:27017 | ||
# not get resolved to localhost:8000. | ||
- localhost.test.build.10gen.cc:8000 | ||
options: | ||
loadBalanced: true | ||
ssl: true |
2 changes: 1 addition & 1 deletion
2
...dlist-discovery/tests/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.json
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
2 changes: 1 addition & 1 deletion
2
...edlist-discovery/tests/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.yml
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
6 changes: 3 additions & 3 deletions
6
source/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero-txt.json
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
6 changes: 3 additions & 3 deletions
6
source/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero-txt.yml
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
6 changes: 3 additions & 3 deletions
6
source/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero.json
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
6 changes: 3 additions & 3 deletions
6
source/initial-dns-seedlist-discovery/tests/load-balanced/srvMaxHosts-zero.yml
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to clarify my understanding. From offline conversation, it sounds like load balancer tests make use of the
test1
,test3
,test4
andtest20
records. Thetest1
andtest4
records seem to be used to test that drivers fail during validation, so updating the port from 27017 (themongos
) to 8000 (the actual LB) is not necessary. Thetest3
record is used to test a successful connection, so the port should be updated, but that record is also used in theload-balanced/srvMaxHosts-zero
test which expects to find 27017. So, we need a newtest23
record that is identical totest3
but points to port 8000. Let me know if that all sounds right.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct (the
test3
record is currently used in variousreplica-set
tests, but you're right that it's required to stay the same for other tests).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, update: This change is now strictly additive. There are two new records,
test23
(replacestest3
) andtest24
(replacestest20
).