-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Replication
-
ALL
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
We have a lot of no passthrough suites that create their own replica sets using ReplSetTest.
On mac os x (tested on my work laptop) this fails with the following error:
[js_test:out_max_time_ms] Error: command did not fail with any of the following codes [ 74, 103, 11602, 109, 308, 10107 ] { [js_test:out_max_time_ms] "ok" : 0, [js_test:out_max_time_ms] "errmsg" : "No host described in new configuration with {version: 1, term: 0} for replica set out_max_time_ms maps to this node", [js_test:out_max_time_ms] "code" : 93, [js_test:out_max_time_ms] "codeName" : "InvalidReplicaSetConfig" [js_test:out_max_time_ms] } : replSetInitiate during initiate failed
The reason for this is that it uses host name in replica set config:
"host" : "M-PN<your mac name>:20040"
And out of the box DNS won't resolve it.
This is controlled by "useHostName" option in ReplSetTest constructor:
There are two workarounds:
- Edit your /etc/hosts to include your host name.
- Works for all tests
- Requires sudo and editing system preferences
- Add "useHostName" to ReplSetTest options
- Works only for the test your run
- Does not require changing your system
It would be great for it to work out of the box somehow.