Fix greping of the journalctl log for neutron notification line
In commit [1] simple grep of the journalctl output was replaced with "--grep" option for journalctl. That is fine as this will grep log on the remote machine and send less data over the network to the Tobiko runner but it wasn't working as it should because regex should be in the quotation marks. This patch fixes that by adding quotes around regex. This patch also increase time in which logs are checked. It was only 5 minutes but it's not really reliable e.g. on the gate so it's now increased to 30 minutes. [1] https://review.opendev.org/c/x/tobiko/+/764351 Change-Id: I1ad3cd9886e0a85647e5a5f98363b10c49967f2c
This commit is contained in:
parent
70671a1269
commit
9be91433cd
@ -91,8 +91,8 @@ class JournalLogDigger(LogFileDigger):
|
||||
try:
|
||||
result = sh.execute(["journalctl", '--no-pager',
|
||||
"--unit", self.filename,
|
||||
"--since", "5 minutes ago",
|
||||
'--grep', pattern],
|
||||
"--since", "30 minutes ago",
|
||||
'--grep', "'%s'" % pattern],
|
||||
**self.execute_params)
|
||||
except sh.ShellCommandFailed as ex:
|
||||
if ex.stdout.endswith('-- No entries --\n'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user