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

Assert addShard command succeeds in jstests/sharding/auth.js test

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 4.7.0
    • None
    • Sharding
    • None
    • Fully Compatible
    • Sharding 2020-06-01
    • 18

    Description

      The jstests/sharding/auth.js test doesn't directly assert the addShard command succeeded. It instead relies on awaitRSClientHosts() to ensure mongos eventually starts opening connections to the "d2" shard. We've historically seen the addShard command fail due to an NetworkInterfaceExceededTimeLimit error and manifest as an assert.soon() failure.

      Adding an assert.commandWorked() would make the manifestation of these failures in Evergreen more obvious.

      print("adding shard " + shardName);
      login(adminUser);
      print("logged in");
      result = s.getDB("admin").runCommand({addShard: shardName});
       
      awaitRSClientHosts(s.s, d1.nodes, {ok: true});
      awaitRSClientHosts(s.s, d2.nodes, {ok: true});
      

      Attachments

        Activity

          People

            max.hirschhorn@mongodb.com Max Hirschhorn
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: