]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix map subscription in YOU_DIED osd_ping handler 1608/head
authorSage Weil <sage@inktank.com>
Sun, 6 Apr 2014 23:03:50 +0000 (16:03 -0700)
committerSage Weil <sage@inktank.com>
Sun, 6 Apr 2014 23:03:50 +0000 (16:03 -0700)
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>
src/osd/OSD.cc

index 52c4f4575022e9c8054a8819fb601c68d2f54f24..baa98481651acf9ba077ab970b46c6110448ec22 100644 (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;
   }