diff options
author | Sage Weil <sage@inktank.com> | 2013-02-12 14:11:09 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-02-12 14:11:09 -0800 |
commit | 302b26ff70ee5539da3dcb2e5614e2b7e83b9dcd (patch) | |
tree | 4ba2a6c68a583d13a688330dce163418add9f89a | |
parent | afda30aeaae0a65f83c6886658354ad2b57c4c43 (diff) | |
download | ceph-302b26ff70ee5539da3dcb2e5614e2b7e83b9dcd.tar.gz |
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 <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
-rw-r--r-- | src/osd/OSD.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index c72b36f2b40..e56818ed523 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; } } |