[SERVER-71320] ReplSetTest silently ignores binVersion if it is specified inside nodes options Created: 14/Nov/22  Updated: 29/Oct/23  Resolved: 29/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Tausif Rahman (Inactive) Assignee: Ivan Fefer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QE 2022-11-28, QE 2022-12-12
Participants:
Linked BF Score: 166

 Description   

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



 Comments   
Comment by Githook User [ 29/Nov/22 ]

Author:

{'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}

Message: SERVER-71320 Check for binVersion and userRandomBinVersion in nodeOptions
Branch: master
https://github.com/mongodb/mongo/commit/5780eb7761504ed0f085216883d481461dc7a6cb

Comment by Githook User [ 21/Nov/22 ]

Author:

{'name': 'Romans Kasperovics', 'email': 'romans.kasperovics@mongodb.com', 'username': 'romanskas'}

Message: Revert "SERVER-71320 Check for binVersion and useRandomBinVersion conflict after merge with node-specific optionsx"

This reverts commit 092b2eec8182bf540d73bd77649617ad2a36300d.
Branch: master
https://github.com/mongodb/mongo/commit/2f15bb54e248ed3cdf232032eec9d5e6dc197452

Comment by Githook User [ 18/Nov/22 ]

Author:

{'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}

Message: SERVER-71320 Check for binVersion and useRandomBinVersion conflict after merge with node-specific optionsx
Branch: master
https://github.com/mongodb/mongo/commit/092b2eec8182bf540d73bd77649617ad2a36300d

Generated at Thu Feb 08 06:18:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.