From: Dan van der Ster Date: Mon, 14 Sep 2020 14:23:53 +0000 (+0200) Subject: ceph.in: ignore failures to flush stdout X-Git-Tag: v16.1.0~1073^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F37143%2Fhead;p=ceph.git ceph.in: ignore failures to flush stdout Catch an IOError exception when flushing ceph stdout. Fixes: https://tracker.ceph.com/issues/47442 Signed-off-by: Dan van der Ster --- diff --git a/src/ceph.in b/src/ceph.in index b2ceafbae65b..be66bc081468 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -1253,8 +1253,12 @@ def main(): except IOError as e: if e.errno != errno.EPIPE: raise e + try: + sys.stdout.flush() + except IOError as e: + if e.errno != errno.EPIPE: + raise e - sys.stdout.flush() # Block until command completion (currently scrub and deep_scrub only) if block: