summaryrefslogtreecommitdiff
path: root/buildscripts/resmokelib
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2023-04-17 22:11:41 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-04-24 01:33:22 +0000
commite3e4b4d6a54a671e564d8bd9e4b34188ab4accd0 (patch)
tree333062c1c55466d24c256efbc666e37008046a26 /buildscripts/resmokelib
parentbd7b3ee926b2cd488c0c71c4208d5737345f7ed8 (diff)
downloadmongo-e3e4b4d6a54a671e564d8bd9e4b34188ab4accd0.tar.gz
SERVER-76310 Use config shard terminology instead of catalog shard
Diffstat (limited to 'buildscripts/resmokelib')
-rw-r--r--buildscripts/resmokelib/config.py6
-rw-r--r--buildscripts/resmokelib/configure_resmoke.py4
-rw-r--r--buildscripts/resmokelib/core/programs.py4
-rw-r--r--buildscripts/resmokelib/run/__init__.py4
-rw-r--r--buildscripts/resmokelib/testing/fixtures/_builder.py12
-rw-r--r--buildscripts/resmokelib/testing/fixtures/shardedcluster.py18
-rw-r--r--buildscripts/resmokelib/utils/__init__.py16
7 files changed, 32 insertions, 32 deletions
diff --git a/buildscripts/resmokelib/config.py b/buildscripts/resmokelib/config.py
index 7643c05da7a..36dee63d936 100644
--- a/buildscripts/resmokelib/config.py
+++ b/buildscripts/resmokelib/config.py
@@ -57,7 +57,7 @@ DEFAULTS = {
"base_port": 20000,
"backup_on_restart_dir": None,
"buildlogger_url": "https://logkeeper2.build.10gen.cc",
- "catalog_shard": None,
+ "config_shard": None,
"continue_on_failure": False,
"dbpath_prefix": None,
"dbtest_executable": None,
@@ -300,8 +300,8 @@ DBTEST_EXECUTABLE = None
# actually running them).
DRY_RUN = None
-# If set, specifies which node is the catalog shard. Can also be set to 'any'.
-CATALOG_SHARD = None
+# If set, specifies which node is the config shard. Can also be set to 'any'.
+CONFIG_SHARD = None
# URL to connect to the Evergreen service.
EVERGREEN_URL = None
diff --git a/buildscripts/resmokelib/configure_resmoke.py b/buildscripts/resmokelib/configure_resmoke.py
index ce9019c90b8..2656b97d754 100644
--- a/buildscripts/resmokelib/configure_resmoke.py
+++ b/buildscripts/resmokelib/configure_resmoke.py
@@ -325,8 +325,8 @@ or explicitly pass --installDir to the run subcommand of buildscripts/resmoke.py
_config.NUM_CLIENTS_PER_FIXTURE = config.pop("num_clients_per_fixture")
_config.NUM_REPLSET_NODES = config.pop("num_replset_nodes")
_config.NUM_SHARDS = config.pop("num_shards")
- _config.CATALOG_SHARD = utils.pick_catalog_shard_node(
- config.pop("catalog_shard"), _config.NUM_SHARDS)
+ _config.CONFIG_SHARD = utils.pick_catalog_shard_node(
+ config.pop("config_shard"), _config.NUM_SHARDS)
_config.PERF_REPORT_FILE = config.pop("perf_report_file")
_config.CEDAR_REPORT_FILE = config.pop("cedar_report_file")
_config.RANDOM_SEED = config.pop("seed")
diff --git a/buildscripts/resmokelib/core/programs.py b/buildscripts/resmokelib/core/programs.py
index 64af7753843..c3598bbd9ab 100644
--- a/buildscripts/resmokelib/core/programs.py
+++ b/buildscripts/resmokelib/core/programs.py
@@ -252,8 +252,8 @@ def mongo_shell_program(logger, executable=None, connection_string=None, filenam
test_data["undoRecorderPath"] = config.UNDO_RECORDER_PATH
- if "catalogShard" not in test_data and config.CATALOG_SHARD is not None:
- test_data["catalogShard"] = True
+ if "configShard" not in test_data and config.CONFIG_SHARD is not None:
+ test_data["configShard"] = True
# There's a periodic background thread that checks for and aborts expired transactions.
# "transactionLifetimeLimitSeconds" specifies for how long a transaction can run before expiring
diff --git a/buildscripts/resmokelib/run/__init__.py b/buildscripts/resmokelib/run/__init__.py
index 3c756f8c521..deab6b701c9 100644
--- a/buildscripts/resmokelib/run/__init__.py
+++ b/buildscripts/resmokelib/run/__init__.py
@@ -946,8 +946,8 @@ class RunPlugin(PluginInterface):
help="Sets the seed used by storage config fuzzer")
mongodb_server_options.add_argument(
- "--catalogShard", dest="catalog_shard", metavar="CONFIG",
- help="If set, specifies which node is the catalog shard. Can also be set to 'any'.")
+ "--configShard", dest="config_shard", metavar="CONFIG",
+ help="If set, specifies which node is the config shard. Can also be set to 'any'.")
internal_options = parser.add_argument_group(
title=_INTERNAL_OPTIONS_TITLE,
diff --git a/buildscripts/resmokelib/testing/fixtures/_builder.py b/buildscripts/resmokelib/testing/fixtures/_builder.py
index 429d2253eaa..c5f87b201fb 100644
--- a/buildscripts/resmokelib/testing/fixtures/_builder.py
+++ b/buildscripts/resmokelib/testing/fixtures/_builder.py
@@ -408,12 +408,12 @@ class ShardedClusterBuilder(FixtureBuilder):
rs_shard_index, kwargs["num_rs_nodes_per_shard"])
sharded_cluster.install_rs_shard(rs_shard)
- catalog_shard = kwargs["catalog_shard"]
+ config_shard = kwargs["config_shard"]
config_svr = None
- if catalog_shard is None:
+ if config_shard is None:
config_svr = self._new_configsvr(sharded_cluster, is_multiversion, old_bin_version)
else:
- config_svr = sharded_cluster.shards[catalog_shard]
+ config_svr = sharded_cluster.shards[config_shard]
sharded_cluster.install_configsvr(config_svr)
for mongos_index in range(kwargs["num_mongos"]):
@@ -445,9 +445,9 @@ class ShardedClusterBuilder(FixtureBuilder):
config.DEFAULT_MONGOS_EXECUTABLE)
kwargs["mongos_executable"] = mongos_executable
- catalog_shard = pick_catalog_shard_node(
- kwargs.pop("catalog_shard", config.CATALOG_SHARD), num_shards)
- kwargs["catalog_shard"] = catalog_shard
+ config_shard = pick_catalog_shard_node(
+ kwargs.pop("config_shard", config.CONFIG_SHARD), num_shards)
+ kwargs["config_shard"] = config_shard
@staticmethod
def _validate_multiversion_options(kwargs: Dict[str, Any],
diff --git a/buildscripts/resmokelib/testing/fixtures/shardedcluster.py b/buildscripts/resmokelib/testing/fixtures/shardedcluster.py
index ba2e27099e1..bd51aeb7f3b 100644
--- a/buildscripts/resmokelib/testing/fixtures/shardedcluster.py
+++ b/buildscripts/resmokelib/testing/fixtures/shardedcluster.py
@@ -24,7 +24,7 @@ class ShardedClusterFixture(interface.Fixture):
preserve_dbpath=False, num_shards=1, num_rs_nodes_per_shard=1, num_mongos=1,
enable_sharding=None, enable_balancer=True, auth_options=None,
configsvr_options=None, shard_options=None, cluster_logging_prefix=None,
- catalog_shard=None):
+ config_shard=None):
"""Initialize ShardedClusterFixture with different options for the cluster processes."""
interface.Fixture.__init__(self, logger, job_num, fixturelib, dbpath_prefix=dbpath_prefix)
@@ -42,7 +42,7 @@ class ShardedClusterFixture(interface.Fixture):
mongod_options.get("set_parameters", {})).copy()
self.mongod_options["set_parameters"]["migrationLockAcquisitionMaxWaitMS"] = \
self.mongod_options["set_parameters"].get("migrationLockAcquisitionMaxWaitMS", 30000)
- self.catalog_shard = catalog_shard
+ self.config_shard = config_shard
self.preserve_dbpath = preserve_dbpath
self.num_shards = num_shards
self.num_rs_nodes_per_shard = num_rs_nodes_per_shard
@@ -91,7 +91,7 @@ class ShardedClusterFixture(interface.Fixture):
def setup(self):
"""Set up the sharded cluster."""
- if self.catalog_shard is None:
+ if self.config_shard is None:
self.configsvr.setup()
# Start up each of the shards
@@ -143,7 +143,7 @@ class ShardedClusterFixture(interface.Fixture):
# Inform mongos about each of the shards
for idx, shard in enumerate(self.shards):
- self._add_shard(client, shard, self.catalog_shard == idx)
+ self._add_shard(client, shard, self.config_shard == idx)
# Ensure that all CSRS nodes are up to date. This is strictly needed for tests that use
# multiple mongoses. In those cases, the first mongos initializes the contents of the config
@@ -340,7 +340,7 @@ class ShardedClusterFixture(interface.Fixture):
mongod_options["dbpath"] = os.path.join(self._dbpath_prefix, "shard{}".format(index))
mongod_options["replSet"] = self._SHARD_REPLSET_NAME_PREFIX + str(index)
- if self.catalog_shard == index:
+ if self.config_shard == index:
del mongod_options["shardsvr"]
mongod_options["configsvr"] = ""
replset_config_options["configsvr"] = True
@@ -390,7 +390,7 @@ class ShardedClusterFixture(interface.Fixture):
"""Install a mongos. Called by a builder."""
self.mongos.append(mongos)
- def _add_shard(self, client, shard, is_catalog_shard):
+ def _add_shard(self, client, shard, is_config_shard):
"""
Add the specified program as a shard by executing the addShard command.
@@ -398,9 +398,9 @@ class ShardedClusterFixture(interface.Fixture):
"""
connection_string = shard.get_internal_connection_string()
- if is_catalog_shard:
- self.logger.info("Adding %s as catalog shard...", connection_string)
- client.admin.command({"transitionToCatalogShard": 1})
+ if is_config_shard:
+ self.logger.info("Adding %s as config shard...", connection_string)
+ client.admin.command({"transitionFromDedicatedConfigServer": 1})
else:
self.logger.info("Adding %s as a shard...", connection_string)
client.admin.command({"addShard": connection_string})
diff --git a/buildscripts/resmokelib/utils/__init__.py b/buildscripts/resmokelib/utils/__init__.py
index fd9fca18f35..2f5475ddb94 100644
--- a/buildscripts/resmokelib/utils/__init__.py
+++ b/buildscripts/resmokelib/utils/__init__.py
@@ -92,18 +92,18 @@ def get_task_name_without_suffix(task_name, variant_name):
return re.sub(fr"(_[0-9]+)?(_{variant_name})?$", "", task_name)
-def pick_catalog_shard_node(catalog_shard, num_shards):
- """Get catalog_shard node index or None if no catalog_shard."""
- if catalog_shard is None:
+def pick_catalog_shard_node(config_shard, num_shards):
+ """Get config_shard node index or None if no config_shard."""
+ if config_shard is None:
return None
- if catalog_shard == "any":
+ if config_shard == "any":
if num_shards is None or num_shards == 0:
return 0
return random.randint(0, num_shards - 1)
- catalog_shard_index = int(catalog_shard)
- if catalog_shard_index < 0 or catalog_shard_index >= num_shards:
- raise ValueError("Catalog shard value must be in range 0..num_shards-1 or \"any\"")
+ config_shard_index = int(config_shard)
+ if config_shard_index < 0 or config_shard_index >= num_shards:
+ raise ValueError("Config shard value must be in range 0..num_shards-1 or \"any\"")
- return catalog_shard_index
+ return config_shard_index