Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15838

Wrong error code from replSetInitiate with 0-vote arbiter

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0-rc0
    • Component/s: Replication
    • Labels:
    • Backwards Compatibility:
      Minor Change
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      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);

      Show
      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);

      Description

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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              spencer Spencer Brody (Inactive)
              Reporter:
              jesse A. Jesse Jiryu Davis
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: