From 9aeced33eeb2fe2ce94b9295e073469170bd675a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 28 Feb 2018 15:37:34 -0600 Subject: [PATCH] librados: fix common_init_finish timing Common_init_finish does start_service_thread and does set_safe_to_start_threads() on the cct, which switches us to 'runtime' mode where we can't accept many config options. Do that *after* we fetch our config from the mon so that we can accept+set runtime options (and not complain to stderr about it). Signed-off-by: Sage Weil --- src/librados/RadosClient.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librados/RadosClient.cc b/src/librados/RadosClient.cc index efbd6b563fb..06436be1835 100644 --- a/src/librados/RadosClient.cc +++ b/src/librados/RadosClient.cc @@ -237,8 +237,6 @@ int librados::RadosClient::ping_monitor(const string mon_id, string *result) int librados::RadosClient::connect() { - common_init_finish(cct); - int err; // already connected? @@ -255,6 +253,8 @@ int librados::RadosClient::connect() return err; } + common_init_finish(cct); + // get monmap err = monclient.build_initial_monmap(); if (err < 0)