Add issues invalid bind regex
Signed-off-by: anikeev-yadro <a.anikeev@yadro.com>
This commit is contained in:
parent
05d592e583
commit
1c3460eecf
1 changed files with 11 additions and 3 deletions
|
@ -35,11 +35,17 @@ class TestLogs:
|
||||||
logs_dir = os.path.join(temp_directory, "logs")
|
logs_dir = os.path.join(temp_directory, "logs")
|
||||||
os.makedirs(logs_dir)
|
os.makedirs(logs_dir)
|
||||||
# Using \b here because 'oom' and 'panic' can sometimes be found in OID or CID
|
# Using \b here because 'oom' and 'panic' can sometimes be found in OID or CID
|
||||||
issues_regex = r"\bpanic\b|\boom\b|too many|insufficient funds|insufficient amount of gas|wallet passwd|secret key|access key"
|
issues_regex = r"\bpanic\b|\boom\b|too many|insufficient funds|insufficient amount of gas|wallet passwd|secret key|access key|cannot assign requested address"
|
||||||
exclude_filter = r"too many requests"
|
exclude_filter = r"too many requests"
|
||||||
|
|
||||||
futures = parallel(
|
futures = parallel(
|
||||||
self._collect_logs_on_host, cluster.hosts, logs_dir, issues_regex, session_start_time, end_time, exclude_filter
|
self._collect_logs_on_host,
|
||||||
|
cluster.hosts,
|
||||||
|
logs_dir,
|
||||||
|
issues_regex,
|
||||||
|
session_start_time,
|
||||||
|
end_time,
|
||||||
|
exclude_filter,
|
||||||
)
|
)
|
||||||
|
|
||||||
hosts_with_problems = [
|
hosts_with_problems = [
|
||||||
|
@ -52,7 +58,9 @@ class TestLogs:
|
||||||
not hosts_with_problems
|
not hosts_with_problems
|
||||||
), f"The following hosts contains contain critical errors in system logs: {', '.join(hosts_with_problems)}"
|
), f"The following hosts contains contain critical errors in system logs: {', '.join(hosts_with_problems)}"
|
||||||
|
|
||||||
def _collect_logs_on_host(self, host: Host, logs_dir: str, regex: str, since: datetime, until: datetime, exclude_filter: str):
|
def _collect_logs_on_host(
|
||||||
|
self, host: Host, logs_dir: str, regex: str, since: datetime, until: datetime, exclude_filter: str
|
||||||
|
):
|
||||||
with reporter.step(f"Get logs from {host.config.address}"):
|
with reporter.step(f"Get logs from {host.config.address}"):
|
||||||
logs = host.get_filtered_logs(filter_regex=regex, since=since, until=until, exclude_filter=exclude_filter)
|
logs = host.get_filtered_logs(filter_regex=regex, since=since, until=until, exclude_filter=exclude_filter)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue