]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/mon: return -EBUSY, instead of asserting, when MonClient::active_con is absent
authorXuehan Xu <xxhdx1985126@gmail.com>
Tue, 12 May 2020 08:36:48 +0000 (16:36 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Fri, 5 Jun 2020 10:44:18 +0000 (18:44 +0800)
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
src/crimson/mon/MonClient.cc

index a6fc5cc024950bd4392d595b302ba931a1e2e789..c8cfac8aa099aee5f721cfd2f4b11af54067ad46 100644 (file)
@@ -617,7 +617,10 @@ int Client::handle_auth_request(crimson::net::ConnectionRef con,
     return -EOPNOTSUPP;
   }
   auto authorizer_challenge = &auth_meta->authorizer_challenge;
-  ceph_assert(active_con);
+  if (!active_con) {
+    logger().error("connection to monitors is down, abort connection for now");
+    return -EBUSY;
+  }
   if (!HAVE_FEATURE(active_con->get_conn()->get_features(), CEPHX_V2)) {
     if (local_conf().get_val<uint64_t>("cephx_service_require_version") >= 2) {
       return -EACCES;