]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephfs: make sure mon authenticate before objecter start
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 04:11:47 +0000 (09:41 +0530)
Signed-off-by: Shaohui Wang <wangshaohui.0512@bytedance.com>
(cherry picked from commit 1de46f335ea21c7369c67a021da79f3c7e929e66)

src/client/Client.cc

index f704f8205d520909fb3f59502d8cd0fe02b1f96b..c5f1cb2b46ef88a577e07303d2b62c99bbf0dc83 100644 (file)
@@ -17666,6 +17666,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();