]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.in: ignore failures to flush stdout 37226/head
authorDan van der Ster <daniel.vanderster@cern.ch>
Mon, 14 Sep 2020 14:23:53 +0000 (16:23 +0200)
committerNathan Cutler <ncutler@suse.com>
Fri, 18 Sep 2020 07:51:27 +0000 (09:51 +0200)
Catch an IOError exception when flushing ceph stdout.

Fixes: https://tracker.ceph.com/issues/47442
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
(cherry picked from commit 48503413a28fbea32f8ef3d48cb765771216f165)

src/ceph.in

index 120057e5b61a4c31dc7df546a7ac1f740999be81..28562eccb3219cb44989bc3778fb04a339776d43 100755 (executable)
@@ -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: