[SERVER-9882] addShard fails if connection string includes hidden member Created: 08/Jun/13 Updated: 12/Oct/15 Resolved: 12/Oct/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.5.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | J Rassi | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | 26qa | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
When addShard is run to add a replica set, it will fail if the seed list of the connection string includes any replica set members that are hidden. This is due to an (arguably incorrect) sanity check in the implementation of addShard: the addShard command runs isMaster on the primary, and then verifies that every member of the seed list shows up in isMaster. Since hidden members are not returned by isMaster, the sanity check fails. Reproduce with:
When the above snippet is run, addShard returns the error "in seed list rs/localhost:31001, host localhost:31001 does not belong to replica set rs". |
| Comments |
| Comment by Andy Schwerin [ 12/Oct/15 ] |
|
Hidden members are not contacted by mongos, and so don't belong in the connection string. I realize that mongos could discover this on its own, but this behavior is intentional and reasonably logical. |
| Comment by auto [ 04/Oct/13 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: Revert " This reverts commit 5e331a573cfd9a860f5afb1e2bb14cad8394f464. |
| Comment by auto [ 18/Jun/13 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: |