From: Mingxin Liu Date: Wed, 31 Aug 2016 04:21:19 +0000 (+0800) Subject: OSDMonitor: should propose osdmap update when OSD cluster_addr was changed X-Git-Tag: v12.0.0~380^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F11065%2Fhead;p=ceph.git OSDMonitor: should propose osdmap update when OSD cluster_addr was changed Signed-off-by: Mingxin Liu --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 861cb6b6060..41c8ba19139 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 ||