change dirty logs to work off a whitelist
instead of marking the logs that we think should be clean, mark
the ones we think should be dirty. This means no new services can
come in with unclean logs.
remove the whitelist data, as that's currently obsolete, we'll
remove the code for it later.
Change-Id: I4b15c932b78f54ec371aa67c7b4e8248b3f9c0eb
diff --git a/tools/check_logs.py b/tools/check_logs.py
index edf95a1..e28c230 100755
--- a/tools/check_logs.py
+++ b/tools/check_logs.py
@@ -30,9 +30,30 @@
dump_all_errors = True
# As logs are made clean, add to this set
-must_be_clean = set(['c-sch', 'g-reg', 'ceilometer-alarm-notifier',
- 'ceilometer-collector', 'horizon', 'n-crt', 'n-obj',
- 'q-vpn'])
+allowed_dirty = set([
+ 'c-api',
+ 'ceilometer-acentral',
+ 'ceilometer-acompute',
+ 'ceilometer-alarm-evaluator',
+ 'ceilometer-anotification',
+ 'ceilometer-api',
+ 'c-vol',
+ 'g-api',
+ 'h-api',
+ 'h-eng',
+ 'ir-cond',
+ 'n-api',
+ 'n-cpu',
+ 'n-net',
+ 'n-sch',
+ 'q-agt',
+ 'q-dhcp',
+ 'q-lbaas',
+ 'q-meta',
+ 'q-metering',
+ 'q-svc',
+ 'q-vpn',
+ 's-proxy'])
def process_files(file_specs, url_specs, whitelists):
@@ -69,12 +90,12 @@
break
if not whitelisted or dump_all_errors:
if print_log_name:
- print("Log File: %s" % name)
+ print("Log File Has Errors: %s" % name)
print_log_name = False
if not whitelisted:
had_errors = True
print("*** Not Whitelisted ***"),
- print(line)
+ print(line.rstrip())
return had_errors
@@ -135,8 +156,8 @@
return 0
failed = False
for log in logs_with_errors:
- if log in must_be_clean:
- print("FAILED: %s" % log)
+ if log not in allowed_dirty:
+ print("Log: %s not allowed to have ERRORS or TRACES" % log)
failed = True
if failed:
return 1