]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
fix a bug at preprocess_beacon 17415/head
authorwangshuguang <wangshugaung@inspur.com>
Fri, 1 Sep 2017 06:43:45 +0000 (14:43 +0800)
committerwangshuguang <wangshugaung@inspur.com>
Fri, 1 Sep 2017 17:56:28 +0000 (01:56 +0800)
when a mds node reboot, mon deal beacon message from this mds.
The connection between mon and MDS has been released.This will cause Session is empty.Then this mon will assert(session);

BTW in mon/OSDMonitor.cc,this bug is fixed.

Signed-off-by: wangshuguang <wangshugaung@inspur.com>
src/mon/MDSMonitor.cc

index 9d0b50d18cfbada9920b38178b048c4c82921e4b..84f6890d3e17def3c1ec01a72bc7d2e5ef71b92c 100644 (file)
@@ -321,7 +321,8 @@ bool MDSMonitor::preprocess_beacon(MonOpRequestRef op)
 
   // check privileges, ignore if fails
   MonSession *session = m->get_session();
-  assert(session);
+  if (!session)
+    goto ignore;
   if (!session->is_capable("mds", MON_CAP_X)) {
     dout(0) << "preprocess_beacon got MMDSBeacon from entity with insufficient privileges "
            << session->caps << dendl;