Skip to content

Commit

Permalink
fix a bug at preprocess_beacon
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
wangshuguang committed Sep 1, 2017
1 parent dd4cc66 commit b2239ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mon/MDSMonitor.cc
Expand Up @@ -321,7 +321,7 @@ bool MDSMonitor::preprocess_beacon(MonOpRequestRef op)

// check privileges, ignore if fails
MonSession *session = m->get_session();
assert(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;
Expand Down

0 comments on commit b2239ce

Please sign in to comment.