]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
task/internal/syslog: Remove old kernel failures from exclude list wip-khiremat-remove-old-kernel-failures-3
authorKotresh HR <khiremat@redhat.com>
Thu, 29 Jul 2021 12:46:03 +0000 (18:16 +0530)
committerKotresh HR <khiremat@redhat.com>
Fri, 6 Aug 2021 05:57:12 +0000 (11:27 +0530)
Add 'syslog' dict to config dictionary which holds the 'ignorelist'
of kernel failures.

Fixes: https://tracker.ceph.com/issues/50150
Signed-off-by: Kotresh HR <khiremat@redhat.com>
teuthology/run.py
teuthology/suite/placeholder.py
teuthology/task/internal/syslog.py

index 37fb42b6029c50b735ccbae98dd3e4c29d9d0472..c301bda7e4843a3ccc75687d32b9830b47177b51 100644 (file)
@@ -224,7 +224,7 @@ def get_initial_tasks(lock, config, machine_type):
             {'internal.archive': None},
             {'internal.coredump': None},
             {'internal.sudo': None},
-            {'internal.syslog': None},
+            {'internal.syslog': config.get('syslog', {})},
         ])
     init_tasks.append({'internal.timer': None})
 
index 4138541723b6aa848af244e4e4b8914fe12a98e2..9ee6b315a747950249698df85da02c8fd5e73df5 100644 (file)
@@ -98,6 +98,9 @@ dict_templ = {
             'sha1': Placeholder('suite_hash'),
         }
     },
+    'syslog': {
+        'ignorelist': ['WARNING*.*check_session_state', 'WARNING*.*__ceph_remove_cap'],
+    },
     'repo': Placeholder('ceph_repo'),
     'sleep_before_teardown': 0,
     'suite': Placeholder('suite'),
index ae6a5324cafa3c558a39209bd1cab7963560b88d..c61ecabffc7c82aa5068b9729dbee54efd4771d8 100644 (file)
@@ -93,56 +93,21 @@ def syslog(ctx, config):
         # flush the file fully. oh well.
 
         log.info('Checking logs for errors...')
+        exclude_errors = config.get('ignorelist', [])
+        log.info('Exclude error list : {0}'.format(exclude_errors))
         for rem in ctx.cluster.remotes.keys():
             log.debug('Checking %s', rem.name)
-            stdout = rem.sh(
-                [
+            args = [
                     'egrep', '--binary-files=text',
-                    '\\bBUG\\b|\\bINFO\\b|\\bDEADLOCK\\b',
+                    '\\bBUG\\b|\\bINFO\\b|\\bDEADLOCK\\b|\\bOops\\b|\\bWARNING\\b|\\bKASAN\\b',
                     run.Raw(f'{archive_dir}/syslog/kern.log'),
-                    run.Raw('|'),
-                    'grep', '-v', 'task .* blocked for more than .* seconds',
-                    run.Raw('|'),
-                    'grep', '-v', 'lockdep is turned off',
-                    run.Raw('|'),
-                    'grep', '-v', 'trying to register non-static key',
-                    run.Raw('|'),
-                    'grep', '-v', 'DEBUG: fsize',  # xfs_fsr
-                    run.Raw('|'),
-                    'grep', '-v', 'CRON',  # ignore cron noise
-                    run.Raw('|'),
-                    'grep', '-v', 'BUG: bad unlock balance detected',  # #6097
-                    run.Raw('|'),
-                    'grep', '-v', 'inconsistent lock state',  # FIXME see #2523
-                    run.Raw('|'),
-                    'grep', '-v', '*** DEADLOCK ***',  # part of lockdep output
-                    run.Raw('|'),
-                    'grep', '-v',
-                    # FIXME see #2590 and #147
-                    'INFO: possible irq lock inversion dependency detected',
-                    run.Raw('|'),
-                    'grep', '-v',
-                    'INFO: NMI handler (perf_event_nmi_handler) took too long to run',  # noqa
-                    run.Raw('|'),
-                    'grep', '-v', 'INFO: recovery required on readonly',
-                    run.Raw('|'),
-                    'grep', '-v', 'ceph-create-keys: INFO',
-                    run.Raw('|'),
-                    'grep', '-v', 'INFO:ceph-create-keys',
-                    run.Raw('|'),
-                    'grep', '-v', 'Loaded datasource DataSourceOpenStack',
-                    run.Raw('|'),
-                    'grep', '-v', 'container-storage-setup: INFO: Volume group backing root filesystem could not be determined',  # noqa
-                    run.Raw('|'),
-                    'egrep', '-v', '\\bsalt-master\\b|\\bsalt-minion\\b|\\bsalt-api\\b',
-                    run.Raw('|'),
-                    'grep', '-v', 'ceph-crash',
-                    run.Raw('|'),
-                    'egrep', '-v', '\\btcmu-runner\\b.*\\bINFO\\b',
-                    run.Raw('|'),
-                    'head', '-n', '1',
-                ],
-            )
+            ]
+            for exclude in exclude_errors:
+                args.extend([run.Raw('|'), 'egrep', '-v', exclude])
+            args.extend([
+                run.Raw('|'), 'head', '-n', '1',
+            ])
+            stdout = rem.sh(args)
             if stdout != '':
                 log.error('Error in syslog on %s: %s', rem.name, stdout)
                 set_status(ctx.summary, 'fail')