[SERVER-69160] Make ShardingTest wait for FCV initialization before running getClusterParameter tests Created: 25/Aug/22  Updated: 29/Oct/23  Resolved: 31/Oct/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 6.0.0, 6.0.1
Fix Version/s: 6.0.4, 6.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Varun Ravichandran Assignee: Varun Ravichandran
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.1, v6.0
Sprint: Security 2022-09-05, Security 2022-09-19, Security 2022-10-03, Security 2022-10-17, Security 2022-10-31, Security 2022-11-14
Participants:
Linked BF Score: 5

 Description   

Today, the ShardingTest test fixture encapsulates all of its necessary setup logic in its constructor. As part of this setup, it starts all of the shardsvr mongods with FCV equal to the last-lts. After the config server is started with the cluster's FCV, it runs addShard on each of the shardsvr replica sets to configure the cluster. As part of the addShard procedure, the config server runs setFeatureCompatibilityVersion on each shard primary so that it can update its FCV document to match that of the config server. This command is run with majority write concern, so there's still a possibility for a minority of nodes on each shard replica set to still be on the last-lts FCV when addShard completes. The ShardingTest constructor just waits for addShard to complete without waiting for replication to complete on each shard. As a result, it's possible for a minority of shard nodes in each shard replica set to still be on an old FCV version when tests begin using the ShardingTest object.

The general solution to this would be to make ShardingTest await replication on each shard after performing addShard to ensure that its FCV is fully up-to-date. If this isn't necessary for most tests, then we can manually do this within disabled_cluster_server_parameters.js since that test requires all nodes to be fully on FCV 6.0 before it can run.



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

Author:

{'name': 'Varun Ravichandran', 'email': 'varun.ravichandran@mongodb.com', 'username': 'varunravi98'}

Message: SERVER-69160: Await replication in shards in shardingTest for FCV initialization

(cherry picked from commit c05489817935b7dda5b2617a2bfa79540d19de90)
Branch: v6.0
https://github.com/mongodb/mongo/commit/d689e62c818c059087b6b9d07661627615a1ad85

Comment by Githook User [ 31/Oct/22 ]

Author:

{'name': 'Varun Ravichandran', 'email': 'varun.ravichandran@mongodb.com', 'username': 'varunravi98'}

Message: SERVER-69160: Await replication in shards in shardingTest for FCV initialization
Branch: master
https://github.com/mongodb/mongo/commit/c05489817935b7dda5b2617a2bfa79540d19de90

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