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:14:42 -0800 |
commit | 20ec490555728251444833520a40b20dc8015216 (patch) | |
tree | 2ae5aaa7b96677aa84dab7c6b2cf8c061b389ce4 | |
parent | cbf63b633e7a59456f503af487fd4ad2607bbd76 (diff) | |
download | ceph-20ec490555728251444833520a40b20dc8015216.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>
(cherry picked from commit 302b26ff70ee5539da3dcb2e5614e2b7e83b9dcd)
-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 181b5c00003..779849c48ea 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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; } } |