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

Under localhost exception, can add replica set members via rs.initiate() but not rs.add()

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.7.2
    • Component/s: Replication, Security, Shell
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      We want to spin up a replica set with three members with auth enabled, and add our first user under the localhost exception. We want the following configuration:

      { '_id':'repl3',
        members:[{'_id':0, 'host':'Shirley:27017'},
                         {'_id':1, 'host':'Matt:27018'},
                         {'_id':2, 'host':'Ben:27019'}]
      }
      

      This workflow is fine:

      1. start all members with --keyFile and --replSet
      2. connect to a member via the shell
      3. run rs.initiate(config from above)
      4. use admin, create a root user, authenticate
      5. done!

      However, this workflow is not allowed:

      1. start all members with --keyFile and --replSet
      2. connect to a member via the shell
      3. run rs.initiate()
      4. use rs.add() to add other two members.
      5. use admin, create a root user, authenticate
      6. done!

      Instead, we must authenticate before rs.add() is allowed:

      1. start all members with --keyFile and --replSet
      2. connect to a member via the shell
      3. run rs.initiate()
      4. use admin, create a root user, authenticate
      5. use rs.add() to add other two members.
      6. done!

      This seems inconsistent?

            Assignee:
            Unassigned Unassigned
            Reporter:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: