]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs: make sure mon authenticate before objecter start 66471/head
authorwangshaohui.0512 <wangshaohui.0512@bytedance.com>
Fri, 8 Aug 2025 10:23:47 +0000 (18:23 +0800)
committerJos Collin <jcollin@redhat.com>
Tue, 2 Dec 2025 01:56:05 +0000 (07:26 +0530)
Signed-off-by: Shaohui Wang <wangshaohui.0512@bytedance.com>
(cherry picked from commit 1de46f335ea21c7369c67a021da79f3c7e929e66)

src/client/Client.cc

index 56a07af9577d6ffe98dcf6e2a5b195ff1d51a6ee..11003c4bca83b85a0f93770e0d730c032b841a03 100644 (file)
@@ -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();