summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSean Dague <sean.dague@samsung.com>2014-03-18 14:31:05 -0400
committerSean Dague <sean.dague@samsung.com>2014-03-18 18:50:24 -0400
commit5d407e21255fa3449478d02fc3754b0b68886237 (patch)
treedcc1e98efbc4b7e04e0d617a18b13309ed1c5267 /tools
parentcd2c782ac1e5024984abca89818b37f76ad0843a (diff)
downloadtempest-5d407e21255fa3449478d02fc3754b0b68886237.tar.gz
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
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check_logs.py35
1 files changed, 28 insertions, 7 deletions
diff --git a/tools/check_logs.py b/tools/check_logs.py
index edf95a12d..e28c23024 100755
--- a/tools/check_logs.py
+++ b/tools/check_logs.py
@@ -30,9 +30,30 @@ is_grenade = (os.environ.get('DEVSTACK_GATE_GRENADE', "0") == "1" or
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 @@ def scan_content(name, content, regexp, whitelist):
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 @@ def main(opts):
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