Skip to content

Commit

Permalink
scylla_node: print check_socket_available failure to log
Browse files Browse the repository at this point in the history
in cases there are failure in dtest runs, those print was
going to stdout, which is hard to track, and might not be
save at all in when using `pytest-xdist`
  • Loading branch information
fruch committed Feb 7, 2024
1 parent cf94a58 commit 538cdee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ccmlib/scylla_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import re
import requests

from ccmlib.common import CASSANDRA_SH, BIN_DIR, wait_for, copy_directory
from ccmlib.common import CASSANDRA_SH, BIN_DIR, wait_for, copy_directory, print_if_standalone

from ccmlib import common
from ccmlib.node import Node, NodeUpgradeError
Expand Down Expand Up @@ -533,10 +533,10 @@ def start(self, join_ring=True, no_wait=False, verbose=False,
try:
common.check_socket_available(itf)
except Exception as msg:
print(f"{msg}. Looking for offending processes...")
print_if_standalone(f"{msg}. Looking for offending processes...", debug_callback=logging.error)
for proc in psutil.process_iter():
if any(self.cluster.ipprefix in cmd for cmd in proc.cmdline()):
print(f"name={proc.name()} pid={proc.pid} cmdline={proc.cmdline()}")
print_if_standalone(f"name={proc.name()} pid={proc.pid} cmdline={proc.cmdline()}", debug_callback=logging.error)
raise msg

marks = []
Expand Down

0 comments on commit 538cdee

Please sign in to comment.