Fix find_msg_in_file method to search in active log file only

In the new environment logs are not yet rotated so there is no log.1
file available.

Change-Id: Ic8f2e6a372c0ab5989fc2ca3d3beb4478e93063d
This commit is contained in:
Alex Katz 2020-10-05 10:27:54 +03:00
parent 2a5113853c
commit eb6c511ed0
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ def find_msg_in_file(node, logfile, message, rotated=False):
if rotated:
suffix = ".1"
else:
suffix = "{,.1}"
suffix = ""
LOG.debug(f'Searching for {message} in {logfile}{suffix} on {node.name}')
result = sh.execute(f'sudo grep -h {message} {logfile}{suffix}',
ssh_client=node.ssh_client,