]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: only share maps on hb connection of OSD_HBMSGS feature is set
authorSage Weil <sage@inktank.com>
Tue, 12 Feb 2013 22:11:09 +0000 (14:11 -0800)
committerSage Weil <sage@inktank.com>
Tue, 12 Feb 2013 22:11:09 +0000 (14:11 -0800)
Back in 1bc419a7affb056540ba8f9b332b6ff9380b37af we started sharing maps
with dead osds via the heartbeat connection, but old code will crash on an
unexpected message.  Only do this if the OSD_HBMSGS feature is present.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
src/osd/OSD.cc

index c72b36f2b40ddc7306999ef21c1b5ac5f491ed5c..e56818ed523daf56b09228a36aa2759d84d0ec40 100644 (file)
@@ -4669,8 +4669,12 @@ bool OSD::require_same_or_newer_map(OpRequestRef op, epoch_t epoch)
     int from = m->get_source().num();
     if (!osdmap->have_inst(from) ||
        osdmap->get_cluster_addr(from) != m->get_source_inst().addr) {
-      dout(0) << "from dead osd." << from << ", dropping, sharing map" << dendl;
-      send_incremental_map(epoch, m->get_connection());
+      if (m->get_connection()->has_feature(CEPH_FEATURE_OSD_HBMSGS)) {
+       dout(10) << "from dead osd." << from << ", dropping, sharing map" << dendl;
+       send_incremental_map(epoch, m->get_connection());
+      } else {
+       dout(10) << "from dead osd." << from << ", but it lacks OSD_HBMSGS feature, not sharing map" << dendl;
+      }
       return false;
     }
   }