-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.7.1
-
Component/s: Replication
-
Environment:Linux localhost.localdomain 3.14.4-200.fc20.x86_64 #1 SMP Tue May 13 13:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
-
ALL
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
A replica may report itself as primary (via isMaster), but when stepDown is issued the command execution fails with "not primary can't step down".
https://github.com/dcci/mongo-replication-perf/blob/master/stepDown.py
can be used to reproduce.
Output:
localhost:30002 5.686825037 [...] localhost:30001 5.59844589233 localhost:30002 5.70268511772 command SON([('replSetStepDown', 30)]) failed: not primary so can't step down {u'hosts': [u'localhost:30002', u'localhost:30003', u'localhost:30001'], u'ismaster': False, u'localTime': datetime.datetime(2014, 6, 2, 22, 52, 13, 153000), u'maxBsonObjectSize': 16777216, u'maxMessageSizeBytes': 48000000, u'maxWireVersion': 2, u'maxWriteBatchSize': 1000, u'me': u'localhost:30002', u'minWireVersion': 0, u'ok': 1.0, u'primary': u'localhost:30003', u'secondary': True, u'setName': u'rs0', u'setVersion': 1}
I bisected the tree to find the commit that caused the problem and we've a culprit:
commit c27f26b7b49714649800a7d602fead7d57ca3805 Author: matt dannenberg <matt.dannenberg@10gen.com> Date: Fri May 23 05:23:13 2014 -0400 SERVER-14042 decrease yea delay from 30 seconds to 3