From b9fe76003e2a4d537e287d40f7dd2e26f52ead4c Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 14 Jun 2019 14:57:55 +0800 Subject: [PATCH] crimson/osd: ignore exception when stopping osd OSD::stop() is a top-level method in the sense that it will be called directly when engine stops. so it should not throw any exceptions. instead, we will print out the error and ignore the exception if any. Signed-off-by: Kefu Chai --- src/crimson/osd/osd.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/crimson/osd/osd.cc b/src/crimson/osd/osd.cc index 11725fb4e73aa7..a21cabaac1047f 100644 --- a/src/crimson/osd/osd.cc +++ b/src/crimson/osd/osd.cc @@ -315,6 +315,8 @@ seastar::future<> OSD::stop() return monc->stop(); }).then([this] { return store->umount(); + }).handle_exception([](auto ep) { + logger().error("error while stopping osd: {}", ep); }); }