From 8301de8588e2b2ce3c3fce8a812f7d2cfc6fb1df Mon Sep 17 00:00:00 2001 From: Dmitriy Kruglov Date: Thu, 21 Nov 2024 16:00:25 +0100 Subject: [PATCH] fix(docker-backend): do not start scylla-manager installation If scylla-manager is not disabled in a test config when running a test on docker backend, the test will try to install the manager and eventually fail (this is due to the fact that SCT installs scylla-manager server on monitor node and docker backend doesn't support dedicated monitoring node docker instance). The change adds a check for this situation, to be able to fail fast and do not continue uch a test configuration on docker backend. Closes: https://github.com/scylladb/scylla-cluster-tests/issues/9028 --- sdcm/sct_config.py | 6 ++++++ unit_tests/test_config.py | 4 ++++ unit_tests/test_config_get_version_based_on_conf.py | 1 + 3 files changed, 11 insertions(+) diff --git a/sdcm/sct_config.py b/sdcm/sct_config.py index 5f1bc2671b..dfdc05bb6a 100644 --- a/sdcm/sct_config.py +++ b/sdcm/sct_config.py @@ -2349,6 +2349,8 @@ def verify_configuration(self): if backend in ('aws', 'gce') and db_type != 'cloud_scylla' and ( self.get('simulated_regions') or 0) < 2: self._check_multi_region_params(backend) + if backend == 'docker': + self._validate_docker_backend_parameters() self._verify_data_volume_configuration(backend) @@ -2796,6 +2798,10 @@ def _verify_scylla_bench_mode_and_workload_parameters(self): if "-workload=" not in cmd: raise ValueError(f"Scylla-bench command {cmd} doesn't have parameter -workload") + def _validate_docker_backend_parameters(self): + if self.get("use_mgmt"): + raise ValueError(f"Scylla Manager is not supported for docker backend") + def init_and_verify_sct_config() -> SCTConfiguration: sct_config = SCTConfiguration() diff --git a/unit_tests/test_config.py b/unit_tests/test_config.py index 5a91fce776..fd65cc70eb 100644 --- a/unit_tests/test_config.py +++ b/unit_tests/test_config.py @@ -95,6 +95,7 @@ def test_04_check_env_parse(self): def test_05_docker(self): os.environ['SCT_CLUSTER_BACKEND'] = 'docker' + os.environ['SCT_USE_MGMT'] = 'false' os.environ['SCT_SCYLLA_VERSION'] = '3.0.3' conf = sct_config.SCTConfiguration() @@ -104,6 +105,7 @@ def test_05_docker(self): def test_06a_docker_latest_no_loader(self): os.environ['SCT_CLUSTER_BACKEND'] = 'docker' + os.environ['SCT_USE_MGMT'] = 'false' os.environ['SCT_SCYLLA_VERSION'] = 'latest' os.environ['SCT_N_LOADERS'] = "0" docker_tag_after_processing = "fake_specific_docker_tag" @@ -118,6 +120,7 @@ def test_06a_docker_latest_no_loader(self): def test_06b_docker_development(self): os.environ['SCT_CLUSTER_BACKEND'] = 'docker' + os.environ['SCT_USE_MGMT'] = 'false' os.environ['SCT_SCYLLA_VERSION'] = '666.development-blah' os.environ['SCT_SCYLLA_REPO_LOADER'] = RPM_URL @@ -884,6 +887,7 @@ def test_31_check_network_config_azure(self): @pytest.mark.integration def test_31_check_network_config_docker(self): os.environ['SCT_CLUSTER_BACKEND'] = 'docker' + os.environ['SCT_USE_MGMT'] = 'false' os.environ['SCT_SCYLLA_VERSION'] = get_latest_scylla_release(product='scylla') conf = sct_config.SCTConfiguration() diff --git a/unit_tests/test_config_get_version_based_on_conf.py b/unit_tests/test_config_get_version_based_on_conf.py index d31a22b7c3..bcc6dded17 100644 --- a/unit_tests/test_config_get_version_based_on_conf.py +++ b/unit_tests/test_config_get_version_based_on_conf.py @@ -58,6 +58,7 @@ def function_setup(): ) def test_docker(scylla_version, expected_docker_image, expected_outcome): os.environ['SCT_CLUSTER_BACKEND'] = 'docker' + os.environ['SCT_USE_MGMT'] = 'false' os.environ['SCT_SCYLLA_VERSION'] = scylla_version conf = sct_config.SCTConfiguration()