From 1de46f335ea21c7369c67a021da79f3c7e929e66 Mon Sep 17 00:00:00 2001 From: "wangshaohui.0512" Date: Fri, 8 Aug 2025 18:23:47 +0800 Subject: [PATCH] cephfs: make sure mon authenticate before objecter start Signed-off-by: Shaohui Wang --- src/client/Client.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/client/Client.cc b/src/client/Client.cc index c94b7c5574595..7e353b5c05107 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -19213,6 +19213,22 @@ int StandaloneClient::init() monclient->shutdown(); return r; } + + r = authenticate(); + if (r < 0) { + // need to do cleanup because we're in an intermediate init state + { + std::scoped_lock l(timer_lock); + timer.shutdown(); + } + + client_lock.unlock(); + objecter->shutdown(); + objectcacher->stop(); + monclient->shutdown(); + return r; + } + objecter->start(); client_lock.unlock(); -- 2.39.5