From 189d9cb956d6ceffe77c5a12a2318539c335cb59 Mon Sep 17 00:00:00 2001 From: wangshuguang Date: Fri, 1 Sep 2017 14:43:45 +0800 Subject: [PATCH] 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 --- src/mon/MDSMonitor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.47.3