-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
This can happen if a replica set member is removed from the replica set (by local configuration on that member) but not removed from the seed list used by clients.
Set up is as follows:
- A: Primary member of a replica set called bob
- B: Secondary member of a replica set called bob
- C: Secondary member of a replica set called bob
A, B and C are used as seeds to MongoClient (and MongoClient is told that the replica set is called bob via the replicaSet argument).
C has its local configuration changed to remove it from the replica set and it is restarted. Now we have:
- A: Primary member of a replica set called bob
- B: Secondary member of a replica set called bob
- C: A server that considers itself not part of any replica set
- The replica set configuration on A and B still thinks C is in the replica set (but correctly records it as unavailable).
- The seed information on clients still contains A, B and C
In this case, the monitor in pyMongo will run an ismaster on C and determine that C is a master. Whilst this is technically accurate, it has failed to check that C is part of the expected replica set.
We've put a temporary fix in our local copy of mongo_replica_set_client.py:Member.update that checks to see if the member is part of any replica set but we couldn't do a complete fix as the replica set information configured in the client has not been passed through to this point.
- related to
-
NODE-787 Node driver requires DB URL to contain hosts that match replica set config
- Closed