osd: fix map subscription in YOU_DIED osd_ping handler

If we have epoch X and find out we died as of epoch Y, we still want to
request X+1.  Among other things, this fixes a 'stall' if Y happens to be
the most recent map published and no new maps are generated because we will
never get anything back from our subscription.

This makes this osdmap_subscribe() caller match every other caller by
passing in current epoch + 1.

Fixes: #8002
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2014-04-06 16:03:50 -07:00
parent 6a4c50d7f2
commit 4ea9e4818f

View File

@ -3012,9 +3012,9 @@ void OSD::handle_osd_ping(MOSDPing *m)
break;
case MOSDPing::YOU_DIED:
dout(10) << "handle_osd_ping " << m->get_source_inst() << " says i am down in " << m->map_epoch
<< dendl;
osdmap_subscribe(m->map_epoch, false);
dout(10) << "handle_osd_ping " << m->get_source_inst()
<< " says i am down in " << m->map_epoch << dendl;
osdmap_subscribe(curmap->get_epoch()+1, false);
break;
}