From: Kefu Chai Date: Sun, 8 Mar 2020 05:39:59 +0000 (+0800) Subject: qa/tasks/ceph_manager: capture stderr for COT X-Git-Tag: v14.2.17~28^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bbbd0b7b24acf45507b50a7bfd542e91a8fc7cee;p=ceph.git qa/tasks/ceph_manager: capture stderr for COT as we are expecting the error message written to stderr, and we need to check for the error messages in it. this change addresses the regression introduced by 204ceee156cbb8a20bdf56efb0cd0610ee4c107e Fixes: https://tracker.ceph.com/issues/44500 Signed-off-by: Kefu Chai --- diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py index 130182f25da..f8afa98835d 100644 --- a/qa/tasks/ceph_manager.py +++ b/qa/tasks/ceph_manager.py @@ -258,7 +258,8 @@ class Thrasher: stdout=BytesIO(), stderr=BytesIO()) if proc.exitstatus == 0: break - elif proc.exitstatus == 1 and proc.stderr == b"OSD has the store locked": + elif (proc.exitstatus == 1 and + six.ensure_str(proc.stderr.getvalue()) == "OSD has the store locked"): continue else: raise Exception("ceph-objectstore-tool: " @@ -324,8 +325,8 @@ class Thrasher: proc = imp_remote.run(args=cmd, wait=True, check_status=False, stderr=BytesIO()) if proc.exitstatus == 1: - bogosity = b"The OSD you are using is older than the exported PG" - if bogosity in proc.stderr.getvalue(): + bogosity = "The OSD you are using is older than the exported PG" + if bogosity in six.ensure_str(proc.stderr.getvalue()): self.log("OSD older than exported PG" "...ignored") elif proc.exitstatus == 10: