]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
internal: ignore binary junk in kernel logs
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 24 Mar 2014 21:13:07 +0000 (14:13 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 24 Mar 2014 21:14:40 +0000 (14:14 -0700)
NUL bytes can show up here after powercycle testing

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
teuthology/task/internal.py

index 4bcb89ecfd2b509a39a90ae8879ad7bc72011949..00b179a2245cdb3ae9b77bddc2060287691df471 100644 (file)
@@ -488,9 +488,13 @@ kern.* -{adir}/syslog/kern.log;RSYSLOG_FileFormat
             log.debug('Checking %s', remote.name)
             r = remote.run(
                 args=[
+                    'cat',
+                    run.Raw('{adir}/syslog/*.log'.format(adir=archive_dir)),
+                    run.Raw('|'),
+                    'tr', '[\\000-\\011\\013-\\037\\177-\\377]', '.',
+                    run.Raw('|'),
                     'egrep',
                     '\\bBUG\\b|\\bINFO\\b|\\bDEADLOCK\\b',
-                    run.Raw('{adir}/syslog/*.log'.format(adir=archive_dir)),
                     run.Raw('|'),
                     'grep', '-v', 'task .* blocked for more than .* seconds',
                     run.Raw('|'),