From: wangshuguang Date: Fri, 1 Sep 2017 06:43:45 +0000 (+0800) Subject: fix a bug at preprocess_beacon X-Git-Tag: v13.0.1~1000^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=189d9cb956d6ceffe77c5a12a2318539c335cb59;p=ceph.git fix a bug at preprocess_beacon 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 --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 9d0b50d18cfb..84f6890d3e17 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -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;