-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 3.2.4
-
Component/s: Replication
-
None
-
Replication
-
ALL
-
- Start a node with --configsvr and without --replSet
- Connect in the shell and run rs.initiate() as above
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
$ mongo --port 27019 MongoDB shell version: 3.2.4 connecting to: 127.0.0.1:27019/test configsvr> db.version() 3.2.4 configsvr> db.serverCmdLineOpts() { "argv" : [ "mongod", "--dbpath", "normal", "--configsvr" ], "parsed" : { "sharding" : { "clusterRole" : "configsvr" }, "storage" : { "dbPath" : "normal" } }, "ok" : 1 } configsvr> rs.initiate({ _id: "abc", configsvr: true, members: [{_id:0, host: "localhost:27019"}]}) { "ok" : 0, "errmsg" : "Missing expected field \"version\"", "code" : 93 } configsvr> rs.initiate({ _id: "abc", configsvr: true, members: [{_id:0, host: "localhost:27019"}], version: 1}) { "ok" : 1 }
Compared to initiating a normal replica set
> rs.initiate({ _id: "abc", members: [{_id:0, host: "localhost:27017"}]}) { "ok" : 1 } abc:PRIMARY> rs.conf() { "_id" : "abc", >>> "version" : 1, "protocolVersion" : NumberLong(1), "members" : [ { "_id" : 0, "host" : "localhost:27017", "arbiterOnly" : false, "buildIndexes" : true, "hidden" : false, "priority" : 1, "tags" : { }, "slaveDelay" : NumberLong(0), "votes" : 1 } ], "settings" : { "chainingAllowed" : true, "heartbeatIntervalMillis" : 2000, "heartbeatTimeoutSecs" : 10, "electionTimeoutMillis" : 10000, "getLastErrorModes" : { }, "getLastErrorDefaults" : { "w" : 1, "wtimeout" : 0 }, "replicaSetId" : ObjectId("56ef4b1cb20cecc4830991bd") } }