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

Re-enable aggregate_$search authentication test case

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.0.0-rc2, 5.1.0-rc0
    • Backlog
    • None
    • None
    • Fully Compatible
    • v5.0
    • Sharding EMEA 2021-06-14

    Description

      The aggregate_$search auth test case has been blacklisted in SERVER-43897 because it is failing during the setup stage  when trying to initialize ReplSetTest in runCommandOnEachPrimary with the error "command replSetGetConfig requires authentication".

      This is the stack trace of the error:

      _getErrorWithCode@src/mongo/shell/utils.js:25:13
      doassert@src/mongo/shell/assert.js:18:14
      _assertCommandWorked@src/mongo/shell/assert.js:719:17
      assert.commandWorked@src/mongo/shell/assert.js:811:16
      _replSetGetConfig@src/mongo/shell/replsettest.js:125:16
      _constructFromExistingSeedNode/conf<@src/mongo/shell/replsettest.js:3268:42
      asCluster@src/mongo/shell/replsettest.js:203:20
      _constructFromExistingSeedNode@src/mongo/shell/replsettest.js:3268:20
      ReplSetTest/<@src/mongo/shell/replsettest.js:3308:13
      retryOnNetworkError@src/mongo/shell/utils.js:57:20
      ReplSetTest@src/mongo/shell/replsettest.js:3304:9
      getConnToPrimaryOrStandalone@jstests/libs/fixture_helpers.js:105:28
      mapOnEachPrimary@jstests/libs/fixture_helpers.js:118:31
      runCommandOnEachPrimary@jstests/libs/fixture_helpers.js:134:16
      setup@jstests/auth/lib/commands_lib.js:228:13
      setup@jstests/auth/lib/commands_lib.js:285:25
      testProperAuthorization@jstests/auth/commands_user_defined_roles.js:32:17
      runOneTest@jstests/auth/commands_user_defined_roles.js:140:15
      runOneTest@jstests/auth/lib/commands_lib.js:278:16
      runTests@jstests/auth/lib/commands_lib.js:325:19
      @jstests/auth/commands_user_defined_roles.js:222:1
      failed to load: jstests/auth/commands_user_defined_roles.js

      In particular the problem occurs when we try to construct the replica set primary connection . In fact we don't pass the authentication parameters to the replica set constructor that will try to infer them from jsTest.options. Unfortunately in these specific auth tests the authentication file is specified in the test itself and not at the suite level (in the suite yaml file). For this reason the jsTest.options won't contain any useful information that the replSet constructor can use to infer authentication parameters, so it will just assume no authentication is required and will invoke replSetGetConfig without authentication. **

       

      Attachments

        Activity

          People

            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: