From 1b9226c72354b2d711753babf025bebd4495e518 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Mon, 15 Sep 2014 17:07:41 -0700 Subject: [PATCH] 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 --- src/osd/OSD.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 91f8bba3ddd9a..56b0851758794 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(); } } -- 2.39.5