[SERVER-9076] Duplicate configdb entries should not be allowed Created: 22/Mar/13  Updated: 11/Jul/16  Resolved: 03/Jul/13

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 2.5.1

Type: Bug Priority: Major - P3
Reporter: Thomas Rueckstiess Assignee: David Hows
Resolution: Done Votes: 1
Labels: neweng, pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-9080 warn or fail on startup when using SC... Closed
Related
related to SERVER-9036 Config server meta-data upgrade from ... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

mongos happily starts when you specify duplicate config servers for the --configdb parameter, for example:

mongos --configdb config1:27017,config1:27017,config3:27017 --logappend --fork

This is easily caused by a typo and can lead to incorrect and unpredictable behavior. In the case of an upgrade from 2.2 to 2.4, it will break the upgrade and manual intervention (resync of config servers, removal of lock, ...) is required.

Each address in the configdb string should be checked not just for string equality but should also be resolved and the resulting address should be checked as well. The set (with no duplicates) of addresses should be equal to the number of entries in the configdb string.



 Comments   
Comment by Matt Kangas [ 03/Jul/13 ]

Verified that our first four buildbot test steps succeed against this. Removed trailing whitespace in a few places before merging.

Is this ticket now complete? If there is follow-on work – e.g. verifying DNS resolution – please create a new ticket, because the work will probably go in a different release.

Comment by auto [ 03/Jul/13 ]

Author:

{u'username': u'daveh86', u'name': u'daveh86', u'email': u'howsdav@gmail.com'}

Message: SERVER-9076 Config Check. Includes Unit Test

Signed-off-by: Matt Kangas <matt.kangas@10gen.com>
Branch: master
https://github.com/mongodb/mongo/commit/b2b5e6663136a965ec0baaf377f88837e8a5b016

Comment by David Hows [ 03/Jul/13 ]

https://github.com/mongodb/mongo/pull/447

Generated at Thu Feb 08 03:19:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.