osd: fix race between handle_osd_ping and handle_osd_map
If handle_osd_map is in progress and handle_osd_ping doesn't have the
map lock, we can't call osdmap->get_inst() in send_still_alive(). Keep
the entity_inst_t in the failure_pending map so that we don't need to.
osd/OSDMap.h: In function 'entity_inst_t OSDMap::get_inst(int)', in thread '0x7fda6a46b710'
osd/OSDMap.h: 477: FAILED assert(is_up(osd))
ceph version 0.24.1 (commit:
e06fb657842379259826f3d9215101fc14575fbd)
1: (OSD::send_still_alive(int)+0x1b9) [0x4dd1b9]
2: (OSD::handle_osd_ping(MOSDPing*)+0x716) [0x4f6446]
3: (OSD::heartbeat_dispatch(Message*)+0x36) [0x4f6666]
4: (SimpleMessenger::dispatch_entry()+0x882) [0x46f002]
5: (SimpleMessenger::DispatchThread::entry()+0x1c) [0x465fac]
6: (()+0x6a3a) [0x7fda7835aa3a]
7: (clone()+0x6d) [0x7fda76f7777d]
Reported-by: Henry C Chang <henry_c_chang@tcloudcomputing.com>
Signed-off-by: Sage Weil <sage@newdream.net>