From: Sage Weil Date: Tue, 12 Feb 2013 22:11:09 +0000 (-0800) Subject: osd: only share maps on hb connection of OSD_HBMSGS feature is set X-Git-Tag: v0.57~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=302b26ff70ee5539da3dcb2e5614e2b7e83b9dcd;p=ceph.git osd: only share maps on hb connection of OSD_HBMSGS feature is set 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 Reviewed-by: Samuel Just --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index c72b36f2b40d..e56818ed523d 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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; } }