Skip to content

Commit

Permalink
fix(local run): check if manager agent is up
Browse files Browse the repository at this point in the history
The changes in commit https://github.com/scylladb/scylla-cluster-tests/commit/
aea611d breaks the opportunity to run tests from local
developer PC.

The setup fails on wait_manager_agent_up function as tries to access nodes via private ip address.
Use curl from DB node when check if manager agent is up instead of send request from runner
(local machine).

Fixes: #7636
  • Loading branch information
juliayakovlev authored and fruch committed Jun 24, 2024
1 parent a9869c2 commit 20d1ce0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sdcm/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1360,8 +1360,12 @@ def is_manager_agent_up(self, port=None):
# When the agent is IP, it should answer an https request of https://NODE_IP:10001/ping with status code 204
# Scylla Manager Agent uses Scylla listen/broadcast address - https://manager.docs.scylladb.com/stable/config/
# scylla-manager-agent-config.html#:~:text=value.%0A%23auth_token%3A-,%23%20Bind%20REST%20API%20to,-the%20specified%20TCP
response = requests.get(f"https://{normalize_ipv6_url(self.scylla_listen_address)}:{port}/ping", verify=False)
return response.status_code == 204
http_address = f"https://{normalize_ipv6_url(self.scylla_listen_address)}:{port}/ping"
curl_output = self.remoter.run(cmd=f'''curl -k --write-out "%{{http_code}}\n" --silent --output /dev/null "{http_address}"''',
verbose=True, ignore_status=True)
LOGGER.debug("curl with scylla_listen_address stdout: %s", curl_output.stdout)
http_status_code = int(curl_output.stdout.strip())
return http_status_code == 204

def wait_manager_agent_up(self, verbose=True, timeout=180):
text = None
Expand Down

0 comments on commit 20d1ce0

Please sign in to comment.