From: Greg Farnum Date: Tue, 16 Sep 2014 00:07:41 +0000 (-0700) Subject: osd: subscribe to the newest osdmap when reconnecting to a monitor X-Git-Tag: v0.86~67^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2499%2Fhead;p=ceph.git osd: subscribe to the newest osdmap when reconnecting to a monitor 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 --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 91f8bba3ddd..56b08517587 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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(); } }