From ebea0ac8ced84cb83a6235ba0d47155b5e3931ea Mon Sep 17 00:00:00 2001 From: songbaisen Date: Thu, 14 Jul 2016 16:10:34 +0800 Subject: [PATCH] mon: OSDMonitor preprocess_pool_op add check only concern our self cluster command we only concern the commands send to ourself cluster Signed-off-by:song baisen --- src/mon/OSDMonitor.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 801ae887f806..58869896326c 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -7703,6 +7703,14 @@ bool OSDMonitor::preprocess_pool_op(MonOpRequestRef op) { op->mark_osdmon_event(__func__); MPoolOp *m = static_cast(op->get_req()); + + if (m->fsid != mon->monmap->fsid) { + dout(0) << __func__ << " drop message on fsid " << m->fsid + << " != " << mon->monmap->fsid << " for " << *m << dendl; + _pool_op_reply(op, -EINVAL, osdmap.get_epoch()); + return true; + } + if (m->op == POOL_OP_CREATE) return preprocess_pool_op_create(op); -- 2.47.3