[SERVER-15838] Wrong error code from replSetInitiate with 0-vote arbiter Created: 28/Oct/14  Updated: 19/Nov/14  Resolved: 30/Oct/14

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 2.8.0-rc0

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-13627 Disallow 0-vote arbiters Closed
Backwards Compatibility: Minor Change
Operating System: ALL
Steps To Reproduce:

var InvalidReplicaSetConfig = 93;
var replTest = new ReplSetTest({nodes: 3});
var conns = replTest.startSet();
var config = replTest.getReplSetConfig();
config.members[2].arbiterOnly = true;
config.members[2].votes = 0;
 
var admin = conns[0].getDB("admin");
 
jsTestLog('replSetInitiate with 0-vote arbiter:');
var response = admin.runCommand({replSetInitiate: config});
printjson(response);
assert.commandFailed(response);
assert.eq(response.code, InvalidReplicaSetConfig);

Participants:

 Description   

When I do replSetInitiate with a configuration that includes a 0-vote arbiter, I expect code 93, "InvalidReplicaSetConfig", not code 2, "BadValue".



 Comments   
Comment by Githook User [ 30/Oct/14 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-15838 Make replSetInitiate return InvalidRepliaSetConfig on problems with the config
Branch: master
https://github.com/mongodb/mongo/commit/f5e67009ead674efb7cf16da2c1c462cc99424db

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