Skip to content

Commit

Permalink
fix(docker-backend): do not start scylla-manager installation
Browse files Browse the repository at this point in the history
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: #9028
  • Loading branch information
dimakr committed Nov 23, 2024
1 parent 5002022 commit 8301de8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sdcm/sct_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions unit_tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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"
Expand All @@ -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

Expand Down Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions unit_tests/test_config_get_version_based_on_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 8301de8

Please sign in to comment.