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

Make auth/user_defined_roles_on_secondaries.js wait for the set to be stable before adding new roles

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.3.14
    • None
    • Security
    • None
    • Fully Compatible
    • ALL
    • Repl 2016-09-19
    • 0

    Description

      The test should make sure the set is healthy, with a primary (and all other nodes are up) before adding roles/users.

          var rstest = new ReplSetTest({name: name, nodes: 1, nodeOptions: {}});
       
          rstest.startSet();
          rstest.initiate();
       
          m0 = rstest.nodes[0];
      ...
          rstest.add();
          rstest.reInitiate();
       
          rstest.getPrimary().getDB("db1").createRole({...
      

      After the reInitiate call m0 might no longer be primary, or be stepping down. There should be a write(w:2)/await or something to ensure that the set has a primary is healthy (all members).

      Attachments

        Activity

          People

            scotthernandez Scott Hernandez (Inactive)
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: