From: Kefu Chai Date: Wed, 27 Nov 2019 09:26:46 +0000 (+0800) Subject: crimson: stop osd before stopping messengers X-Git-Tag: v15.1.0~739^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=642f68159e3add230b52410f3069b81da5378f4b;p=ceph.git crimson: stop osd before stopping messengers so we can drain all pending tasks referencing messenger before destroying it, otherwise they will be using a already-stopped messenger when they are still alive. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/osd/main.cc b/src/crimson/osd/main.cc index e8584bdbe34..8d9152debd4 100644 --- a/src/crimson/osd/main.cc +++ b/src/crimson/osd/main.cc @@ -173,9 +173,6 @@ int main(int argc, char* argv[]) reference_wrapper(client_msgr.local()), reference_wrapper(hb_front_msgr.local()), reference_wrapper(hb_back_msgr.local())).get(); - seastar::engine().at_exit([&] { - return osd.stop(); - }); seastar::engine().at_exit([&] { return seastar::when_all_succeed(cluster_msgr.stop(), client_msgr.stop(), @@ -194,6 +191,9 @@ int main(int argc, char* argv[]) local_conf().get_val("osd_uuid"), local_conf().get_val("fsid")).get(); } + seastar::engine().at_exit([&] { + return osd.stop(); + }); if (config.count("mkkey") || config.count("mkfs")) { seastar::engine().exit(0); } else {