From fe33935453615604e6296ac994d452018578b83b Mon Sep 17 00:00:00 2001 From: Mingxin Liu Date: Wed, 31 Aug 2016 12:21:19 +0800 Subject: [PATCH] OSDMonitor: should propose osdmap update when OSD cluster_addr was changed Signed-off-by: Mingxin Liu --- src/mon/OSDMonitor.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 861cb6b6060e7..41c8ba191395e 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -2101,7 +2101,8 @@ bool OSDMonitor::preprocess_boot(MonOpRequestRef op) // already booted? if (osdmap.is_up(from) && - osdmap.get_inst(from) == m->get_orig_source_inst()) { + osdmap.get_inst(from) == m->get_orig_source_inst() && + osdmap.get_cluster_addr(from) == m->cluster_addr) { // yup. dout(7) << "preprocess_boot dup from " << m->get_orig_source_inst() << " == " << osdmap.get_inst(from) << dendl; @@ -2170,7 +2171,8 @@ bool OSDMonitor::prepare_boot(MonOpRequestRef op) dout(7) << __func__ << " was up, first marking down " << osdmap.get_inst(from) << dendl; // preprocess should have caught these; if not, assert. - assert(osdmap.get_inst(from) != m->get_orig_source_inst()); + assert(osdmap.get_inst(from) != m->get_orig_source_inst() || + osdmap.get_cluster_addr(from) != m->cluster_addr); assert(osdmap.get_uuid(from) == m->sb.osd_fsid); if (pending_inc.new_state.count(from) == 0 || -- 2.47.3