From: Sage Weil Date: Tue, 3 Aug 2010 16:36:55 +0000 (-0700) Subject: osd: fix map sharing with old heartbeat peers X-Git-Tag: v0.21.1~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4bcba121ac165939b3a825564d67fbc1f2e74cf1;p=ceph.git osd: fix map sharing with old heartbeat peers The addr is in old_inst, since it's an old peer. Fixes a crash like osd/OSD.cc: In function 'void OSD::_share_map_outgoing(const entity_inst_t&)': osd/OSD.cc:1791: FAILED assert(inst.name.is_osd()) 1: (OSD::update_heartbeat_peers()+0x1d3f) [0x4da66f] 2: (OSD::activate_map(ObjectStore::Transaction&, std::list >&)+0x8ee) [0x4db61e] 3: (OSD::handle_osd_map(MOSDMap*)+0x233a) [0x4e506a] 4: (OSD::_dispatch(Message*)+0x230) [0x4ef400] 5: (OSD::ms_dispatch(Message*)+0x39) [0x4efe39] 6: (SimpleMessenger::dispatch_entry()+0x749) [0x461fa9] 7: (SimpleMessenger::DispatchThread::entry()+0x1c) [0x458f6c] 8: (Thread::_entry_func(void*)+0xa) [0x46cf1a] 9: (()+0x69ca) [0x7f978d6fb9ca] 10: (clone()+0x6d) [0x7f978c91b6cd] introduced by 9bfb8da9f925642bca46528a999124cd8b28ba2a. Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index cddcd3249af..76b9c7360d8 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1214,7 +1214,7 @@ void OSD::update_heartbeat_peers() << " as of " << p->second << dendl; // share latest map with this peer, so they know not to expect // heartbeats from us. otherwise they may mark us down! - _share_map_outgoing(heartbeat_inst[p->first]); + _share_map_outgoing(old_inst[p->first]); } } for (map::iterator p = old_from.begin();