[CSHARP-3951] Get all tests to pass against a cluster with two mongos routers and default configurations Created: 02/Nov/21 Updated: 27/Oct/23 Resolved: 02/Dec/21 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Testing |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Unknown |
| Reporter: | Robert Stam | Assignee: | Unassigned |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | green-build-friday | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
There are a number of tests that fail when run against a sharded cluster with two mongos routers and default configurations. The main cause of failure is that a sharded cluster started by mlaunch uses consecutive port numbers. Notice in particular (below) that the cluster is using port 27020. This conflicts with `mongocrypt` also defaulting to use port 27020. While mlaunch can be told to use a different port range, that then in turn requires temporarily setting up the `MONGODB_URI` and `MONGODB_URI_WITH_MULTIPLE_MONGOSES` which requires a number of manual steps to set, load, unset and unload. The preferred scenario is that the tests should all pass using a default mlaunch sharded cluster configuration and the default connection strings built into the test suite. To reproduce start a cluster with mlaunch like this:
which results in the following cluster configuration:
Then run the tests using:
The tests should be run using the default connection strings built into the test suite. In other words, the `MONGODB_URI` and `MONGODB_URI_WITH_MULTIPLE_MONGOSES` environment variables should not be set. |
| Comments |
| Comment by Robert Stam [ 02/Dec/21 ] |
|
I have confirmed that now that This ticket can be closed with no further work. |
| Comment by Robert Stam [ 02/Nov/21 ] |
|
Solving the conflict over port 27020 obviously requires some type of configuration to avoid the conflict. The first possible configuration was mentioned above: tell mlaunch to use a different port range and set the `MONGODB_URI` and `MONGODB_URI_WITH_MULTIPLE_MONGOSES` environment variable. This clearly works but is awkward because you have to remember to set the environment variables and you also have to remember to unset them when switching to test against other clusters you might spin up that use the default port of 27017. The second possible configuration is to configure all uses of `mongocryptd` to use a different port. This would be great because you could set an environment variable to do that once and then forget about it. It would never have to be changed or unset. That's what If |