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 <sage@redhat.com>
This commit is contained in:
Sage Weil 2018-02-28 15:37:34 -06:00
parent 12062e7d87
commit 9aeced33ee

View File

@ -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)