diff options
author | Christopher Hoffman <choffman@redhat.com> | 2022-10-18 22:14:19 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2025-01-14 20:40:40 +0100 |
commit | 5d92965b31800bd7106e6f40fe4fc78b07e6f2e9 (patch) | |
tree | d09e7888d1317c7f2e111982185a817c91852a28 /qa/tasks/rook.py | |
parent | Merge pull request #60958 from xxhdx1985126/wip-69120 (diff) | |
download | ceph-5d92965b31800bd7106e6f40fe4fc78b07e6f2e9.tar.xz ceph-5d92965b31800bd7106e6f40fe4fc78b07e6f2e9.zip |
qa/tasks: Include stderr on tasks badness check.
Make sure that first_in_ceph_log() doesn't return None (which is
treated as success/"no badness" by the caller) if the cluster log file
is missing.
Fixes: https://tracker.ceph.com/issues/57864
Co-authored-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'qa/tasks/rook.py')
-rw-r--r-- | qa/tasks/rook.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qa/tasks/rook.py b/qa/tasks/rook.py index 6cb75173966..fae5ef3bf00 100644 --- a/qa/tasks/rook.py +++ b/qa/tasks/rook.py @@ -8,7 +8,7 @@ import json import logging import os import yaml -from io import BytesIO +from io import BytesIO, StringIO from tarfile import ReadError from tasks.ceph_manager import CephManager @@ -235,10 +235,14 @@ def ceph_log(ctx, config): r = ctx.rook[cluster_name].remote.run( stdout=BytesIO(), args=args, + stderr=StringIO(), ) stdout = r.stdout.getvalue().decode() if stdout: return stdout + stderr = r.stderr.getvalue() + if stderr: + return stderr return None if first_in_ceph_log('\[ERR\]|\[WRN\]|\[SEC\]', |