Skip to content

Commit

Permalink
More diagnostic logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei Voronezhskii committed Aug 16, 2018
1 parent fcb4816 commit 64a4f63
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/tarantool_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def send_command(command):

def killall_servers(self, server, ts, crash_occured):
""" kill all servers and crash detectors before stream swap """
color_log('Kill all servers ...\n', schema='info')
check_list = ts.servers.values() + [server, ]

# check that all servers stopped correctly
Expand Down Expand Up @@ -697,13 +698,18 @@ def cleanup(self, full=False):

def stop(self, silent=True):
if self._start_against_running:
color_log('Server [%s] start against running ...\n', schema='test_var')
return
if self.status != 'started':
if not silent:
raise Exception('Server is not started')
else:
color_log('Server [%s] is not started (status:%s) ...\n' % (self.name, self.status), schema='test_var')
return
if not silent:
color_stdout('Stopping the server ...\n', schema='serv_text')
else:
color_log('Stopping the server ...\n', schema='serv_text')
# kill only if process is alive
if self.process is not None and self.process.returncode is None:
color_log('TarantoolServer.stop(): stopping the %s\n'
Expand Down Expand Up @@ -731,6 +737,8 @@ def kill_old_server(self, silent=True):
return False
if not silent:
color_stdout(' Found old server, pid {0}, killing ...'.format(pid), schema='info')
else:
color_log(' Found old server, pid {0}, killing ...'.format(pid), schema='info')
try:
os.kill(pid, signal.SIGTERM)
except OSError:
Expand Down

0 comments on commit 64a4f63

Please sign in to comment.