From 48503413a28fbea32f8ef3d48cb765771216f165 Mon Sep 17 00:00:00 2001 From: Dan van der Ster Date: Mon, 14 Sep 2020 16:23:53 +0200 Subject: [PATCH] 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 --- src/ceph.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ceph.in b/src/ceph.in index b2ceafbae65..be66bc08146 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: