]> 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:14:42 +0000 (14:14 -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>
(cherry picked from commit 302b26ff70ee5539da3dcb2e5614e2b7e83b9dcd)

src/osd/OSD.cc

index 181b5c00003f8bae64474b08ec31ee59da42d72f..779849c48ea69a2e85dd2b36c3bf3bbc6c0f83ff 100644 (file)
@@ -4507,8 +4507,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;
     }
   }