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

ReplSetTest silently ignores binVersion if it is specified inside nodes options

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • QE 2022-11-28, QE 2022-12-12
    • 166

      Some of our code sets binVersion for each node in ReplSetTest options. This behaviour is wrong and we need to throw an explicit error when it happens.

      Here we take our node-specific options and merge them into options object:
      https://github.com/mongodb/mongo/blob/05518f9b480f4f65fc963b47ef4cf45c9e4807b5/src/mongo/shell/replsettest.js#L2782

      And in the next code block we override binVersion with "latest" or useRandomBinVersionsWithinReplicaSet: https://github.com/mongodb/mongo/blob/05518f9b480f4f65fc963b47ef4cf45c9e4807b5/src/mongo/shell/replsettest.js#L2795

      We also state that setting both binVersion and useRandomBinVersionsWithinReplicaSet is incorrect, but we check that before we merge node-specific options:
      https://github.com/mongodb/mongo/blob/05518f9b480f4f65fc963b47ef4cf45c9e4807b5/src/mongo/shell/replsettest.js#L2754

      We also set FCV based on node-specific binVersion values: 
      https://github.com/mongodb/mongo/blob/05518f9b480f4f65fc963b47ef4cf45c9e4807b5/src/mongo/shell/replsettest.js#L1363
      https://github.com/mongodb/mongo/blob/05518f9b480f4f65fc963b47ef4cf45c9e4807b5/src/mongo/shell/replsettest.js#L1435

      Which leads to an interesting situation when we can think that we started 6.0, but actually we started 6.2 with 6.0 FCV

            Assignee:
            ivan.fefer@mongodb.com Ivan Fefer
            Reporter:
            tausif.rahman@mongodb.com Tausif Rahman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: