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: v14.2.12~65^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F37226%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 (cherry picked from commit 48503413a28fbea32f8ef3d48cb765771216f165) --- diff --git a/src/ceph.in b/src/ceph.in index 120057e5b61..28562eccb32 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -1250,8 +1250,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: