From ef3e5b1069c81f4e5b64e6119b467aeb7193e0b7 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 24 Apr 2018 13:02:14 -0500 Subject: [PATCH] osd: publish osdmap to OSDService before starting wq threads The worker threads may request the map from the service (notably, advance_pg() does this). Fixes: http://tracker.ceph.com/issues/21977 Signed-off-by: Sage Weil --- src/osd/OSD.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 9b8891e96ba30..734d1db7b47ad 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2606,6 +2606,11 @@ int OSD::init() monc->set_log_client(&log_client); update_log_config(); + service.init(); + service.publish_map(osdmap); + service.publish_superblock(superblock); + service.max_oldest_map = superblock.oldest_map; + osd_op_tp.start(); command_tp.start(); @@ -2619,11 +2624,6 @@ int OSD::init() tick_timer_without_osd_lock.add_event_after(cct->_conf->osd_heartbeat_interval, new C_Tick_WithoutOSDLock(this)); } - service.init(); - service.publish_map(osdmap); - service.publish_superblock(superblock); - service.max_oldest_map = superblock.oldest_map; - osd_lock.Unlock(); r = monc->authenticate(); -- 2.39.5