]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: subscribe to the newest osdmap when reconnecting to a monitor 2499/head
authorGreg Farnum <greg@inktank.com>
Tue, 16 Sep 2014 00:07:41 +0000 (17:07 -0700)
committerGreg Farnum <greg@inktank.com>
Tue, 16 Sep 2014 00:07:41 +0000 (17:07 -0700)
This is mostly relevant in testing clusters, but it ensures that an OSD
disconnecting from the monitor at the wrong time will still see any recent
map updates and prevent accidental loss of map injection into the OSD cluster.
Fixes: #9219
Signed-off-by: Greg Farnum <greg@inktank.com>
src/osd/OSD.cc

index 91f8bba3ddd9a3ace19e77785bbf58de1bd73680..56b0851758794228f784e9710cb94a5938390e31 100644 (file)
@@ -4335,6 +4335,7 @@ void OSD::ms_handle_connect(Connection *con)
       send_pg_stats(ceph_clock_now(cct));
 
       monc->sub_want("osd_pg_creates", 0, CEPH_SUBSCRIBE_ONETIME);
+      monc->sub_want("osdmap", osdmap->get_epoch(), CEPH_SUBSCRIBE_ONETIME);
       monc->renew_subs();
     }
   }