diff --git a/pyproject.toml b/pyproject.toml index 158e822a543..25fca94959b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ dependencies = [ "questionary==2.1.1", "requests==2.33.0", "rich==15.0.0", - "scylla-driver==3.29.9", + "scylla-driver @ git+https://github.com/scylladb/python-driver.git@dk/fix-for-proxy-access-2-with-license-fix", "sortedcontainers==2.4.0", "ssh2-python>=1.1.2.post1", "tcconfig==0.29.1", diff --git a/run-ami-artifact-test.sh b/run-ami-artifact-test.sh new file mode 100755 index 00000000000..6ac982d8ce8 --- /dev/null +++ b/run-ami-artifact-test.sh @@ -0,0 +1,8 @@ +#!/bin/bash +export SCT_SCYLLA_VERSION='master:latest' +export SCT_ENABLE_ARGUS=false + +./sct.py run-test artifacts_test.ArtifactsTest.test_scylla_service \ + --backend aws \ + --config test-cases/artifacts/ami.yaml \ + --config configurations/network_config/test_communication_public.yaml diff --git a/sdcm/cluster.py b/sdcm/cluster.py index 034563d3572..019693d96f2 100644 --- a/sdcm/cluster.py +++ b/sdcm/cluster.py @@ -56,7 +56,12 @@ from cassandra.cluster import Cluster as ClusterDriver from cassandra.cluster import NoHostAvailable, ConnectionShutdown from cassandra.policies import RetryPolicy -from cassandra.policies import WhiteListRoundRobinPolicy, RackAwareRoundRobinPolicy, LoadBalancingPolicy +from cassandra.policies import ( + DynamicWhiteListRoundRobinPolicy, + LoadBalancingPolicy, + RackAwareRoundRobinPolicy, + WhiteListRoundRobinPolicy, +) from cassandra.query import SimpleStatement from argus.common.enums import ResourceState from argus.client.sct.types import LogLink @@ -4550,6 +4555,12 @@ def get_load_balancing_policy( - The `whitelist_nodes` parameter is typically used by nemeses that pass a list of alive nodes. """ node_ips = self.get_node_cql_ips(nodes=whitelist_nodes if whitelist_nodes else self.nodes) + if self.test_config.IP_SSH_CONNECTIONS == "public": + LOGGER.debug( + "Using DynamicWhiteListRoundRobinPolicy for public address connections. Node IPs: %s", + node_ips, + ) + return DynamicWhiteListRoundRobinPolicy(), node_ips wlrr = WhiteListRoundRobinPolicy(node_ips) if self.params.get("rack_aware_loader") and self.racks_count > 1: # - if there are multiple rack/AZs configured, we'll try to configue RackAwareRoundRobinPolicy @@ -4642,7 +4653,10 @@ def cql_connection_exclusive( # RackAwareRoundRobinPolicy is not applicable for exclusive node connections, # as it operates based on rack and datacenter, not individual nodes. node_ips = [node.cql_address] - wlrr = WhiteListRoundRobinPolicy(node_ips) + if self.test_config.IP_SSH_CONNECTIONS == "public": + wlrr = DynamicWhiteListRoundRobinPolicy() + else: + wlrr = WhiteListRoundRobinPolicy(node_ips) return self._create_session( node=node, keyspace=keyspace,