]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix map sharing with old heartbeat peers
authorSage Weil <sage@newdream.net>
Tue, 3 Aug 2010 16:36:55 +0000 (09:36 -0700)
committerSage Weil <sage@newdream.net>
Tue, 3 Aug 2010 16:39:01 +0000 (09:39 -0700)
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<Context*, std::allocator<Context*> >&)+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 <sage@newdream.net>
src/osd/OSD.cc

index cddcd3249afe0ff16fca882c920e2ec0e891e3a1..76b9c7360d872cbd32a12e850bf7e22c2e46afe7 100644 (file)
@@ -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<int,epoch_t>::iterator p = old_from.begin();