Skip to content
Merged
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
4 changes: 2 additions & 2 deletions ccmlib/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ def watch_log_for_death(self, nodes, from_mark=None, timeout=600, filename='syst
the log is watched from the beginning.
"""
tofind = nodes if isinstance(nodes, list) else [nodes]
tofind = [f"{node.address()}.* now (dead|DOWN)" for node in tofind]
tofind = [f"({node.address()}|{node.hostid()}).* now (dead|DOWN)" for node in tofind]
self.watch_log_for(tofind, from_mark=from_mark, timeout=timeout, filename=filename)

def watch_log_for_alive(self, nodes, from_mark=None, timeout=120, filename='system.log'):
Expand All @@ -531,7 +531,7 @@ def watch_log_for_alive(self, nodes, from_mark=None, timeout=120, filename='syst
nodes are marked UP. This method works similarly to watch_log_for_death.
"""
tofind = nodes if isinstance(nodes, list) else [nodes]
tofind = [f"{node.address()}.* now UP" for node in tofind]
tofind = [f"({node.address()}|{node.hostid()}).* now UP" for node in tofind]
self.watch_log_for(tofind, from_mark=from_mark, timeout=timeout, filename=filename)

def wait_for_binary_interface(self, **kwargs):
Expand Down
4 changes: 4 additions & 0 deletions ccmlib/scylla_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1449,6 +1449,10 @@ def rollback(self, upgrade_to_version):
def hostid(self, timeout=60, force_refresh=False):
if self.node_hostid and not force_refresh:
return self.node_hostid
m = self.grep_log("init - Setting local host id to (.+?)$")
if m:
self.node_hostid = m[-1][1].group(1)
return self.node_hostid
try:
node_address = self.address()
url = f"http://{node_address}:{self.api_port}/storage_service/hostid/local"
Expand Down