Skip to content

Commit

Permalink
fix(jmx): fix wait for jmx up
Browse files Browse the repository at this point in the history
As we now verify ports being open from sct runner, we cannot use it for
jmx as it listens on localhost.

Fix by verifying JMX being up by verification of log message in
scylla-jmx service status.

fixes: #8183
(cherry picked from commit abc641b)
  • Loading branch information
soyacz authored and mergify[bot] committed Jul 30, 2024
1 parent 0a8c25e commit 2d490ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdcm/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,9 @@ def db_up(self):
def jmx_up(self):
if not self.is_service_exists(service_name='scylla-jmx'):
return True
return self.is_port_used(port=7199, service_name="scylla-jmx")
return self.remoter.run(f"{self.systemctl} is-active scylla-jmx.service && "
f"{self.systemctl} status scylla-jmx.service | grep 'JMX is enabled to receive remote connections on port'",
timeout=10, ignore_status=True).return_code == 0

def cs_installed(self, cassandra_stress_bin=None):
if cassandra_stress_bin is None:
Expand Down

0 comments on commit 2d490ac

Please sign in to comment.