Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions run-ami-artifact-test.sh
Original file line number Diff line number Diff line change
@@ -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
18 changes: 16 additions & 2 deletions sdcm/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
Loading