mirror of
https://github.com/ceph/ceph
synced 2025-02-22 10:37:15 +00:00
qa/tasks/cephadm: fix log whitelist when there is no whitelist
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
a09eb10220
commit
2681985983
@ -159,8 +159,9 @@ def ceph_log(ctx, config):
|
||||
'/var/log/ceph/{fsid}/ceph.log'.format(
|
||||
fsid=fsid),
|
||||
]
|
||||
for exclude in excludes:
|
||||
args.extend([run.Raw('|'), 'egrep', '-v', exclude])
|
||||
if excludes:
|
||||
for exclude in excludes:
|
||||
args.extend([run.Raw('|'), 'egrep', '-v', exclude])
|
||||
args.extend([
|
||||
run.Raw('|'), 'head', '-n', '1',
|
||||
])
|
||||
@ -174,7 +175,7 @@ def ceph_log(ctx, config):
|
||||
return None
|
||||
|
||||
if first_in_ceph_log('\[ERR\]|\[WRN\]|\[SEC\]',
|
||||
config['log-whitelist']) is not None:
|
||||
config.get('log-whitelist')) is not None:
|
||||
log.warning('Found errors (ERR|WRN|SEC) in cluster log')
|
||||
ctx.summary['success'] = False
|
||||
# use the most severe problem as the failure reason
|
||||
|
Loading…
Reference in New Issue
Block a user