[SERVER-22731] give correct error message when running initiate on a non-replset mongod Created: 18/Feb/16  Updated: 25/Jan/17  Resolved: 19/Feb/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.2.3
Fix Version/s: 3.2.4, 3.3.2

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: code-and-test
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-17491 Messages confusing in replSetInitiate... Closed
is related to SERVER-19537 Allow replSetInitiate on nodes not st... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: Repl 11 (03/11/16)
Participants:

 Description   

If you attempt to run replSetInitiate() on a mongod that was not started with --replSet, and this isn't for a CSRS upgrade, you will get a mysterious error message:

{ "ok" : 0, "errmsg" : "Missing expected field \"version\"", "code" : 93 }

This is because we skip adding the version field for non-replsets, and we try to validate the config before we detect the issue.



 Comments   
Comment by Githook User [ 19/Feb/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-22731 allow replSetInitiate on nodes started with --configsvr but not --replSet

(cherry picked from commit 0e6d01cb63688d9f130756bccb56baaa4de07170)
Branch: v3.2
https://github.com/mongodb/mongo/commit/2df600bee60bfdc996c632ffddbb1a8491a6577c

Comment by Githook User [ 19/Feb/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-22731 allow replSetInitiate on nodes started with --configsvr but not --replSet
Branch: master
https://github.com/mongodb/mongo/commit/0e6d01cb63688d9f130756bccb56baaa4de07170

Generated at Thu Feb 08 04:01:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.