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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.14
    • Affects Version/s: None
    • Component/s: Security
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Repl 2016-09-19
    • 0

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

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

              Created:
              Updated:
              Resolved: