]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSDMonitor: should propose osdmap update when OSD cluster_addr was changed 11065/head
authorMingxin Liu <mingxin@xsky.com>
Wed, 31 Aug 2016 04:21:19 +0000 (12:21 +0800)
committerMingxin Liu <mingxin@xsky.com>
Thu, 22 Dec 2016 14:49:00 +0000 (22:49 +0800)
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
src/mon/OSDMonitor.cc

index 861cb6b6060e7474db2c5d4787f094335aa6803f..41c8ba191395e00749937d95eabe4f1d0c93f8ce 100644 (file)
@@ -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 ||