Commit 00ea6255 authored by Łukasz Nowak's avatar Łukasz Nowak

standalone: Return full process log

In some test cases it's needed to have access to full process log, so and
readProcessStdoutLog can provide it.
parent 91edab77
...@@ -883,11 +883,7 @@ class StandaloneSlapOS(object): ...@@ -883,11 +883,7 @@ class StandaloneSlapOS(object):
if process_info['exitstatus'] == 0: if process_info['exitstatus'] == 0:
return return
if retry >= max_retry: if retry >= max_retry:
# get the last lines of output, at most `error_lines`. If output = supervisor.readProcessStdoutLog(command, 0, 0)
# these lines are long, the output may be truncated.
_, log_offset, _ = supervisor.tailProcessStdoutLog(command, 0, 0)
output, _, _ = supervisor.tailProcessStdoutLog(
command, log_offset - (2 << 13), 2 << 13)
raise SlapOSNodeCommandError({ raise SlapOSNodeCommandError({
'output': '\n'.join(output.splitlines()[-error_lines:]), 'output': '\n'.join(output.splitlines()[-error_lines:]),
'exitstatus': process_info['exitstatus'], 'exitstatus': process_info['exitstatus'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment