From b617c9b3259e461ace5cd7e6c50aa3cebfd1f104 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 (cherry picked from commit 1de46f335ea21c7369c67a021da79f3c7e929e66) --- src/client/Client.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/client/Client.cc b/src/client/Client.cc index 56a07af9577d..11003c4bca83 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -17608,6 +17608,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.47.3