From 20d1ce0bb354bd3dc288431c2696e205d84c1231 Mon Sep 17 00:00:00 2001 From: Julia Yakovlev Date: Wed, 19 Jun 2024 16:08:08 +0300 Subject: [PATCH] fix(local run): check if manager agent is up The changes in commit https://github.com/scylladb/scylla-cluster-tests/commit/ aea611d6142a6fb80cca4d7663a419407879ae90 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: https://github.com/scylladb/scylla-cluster-tests/issues/7636 --- sdcm/cluster.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sdcm/cluster.py b/sdcm/cluster.py index e537ea2c1b..a629497beb 100644 --- a/sdcm/cluster.py +++ b/sdcm/cluster.py @@ -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