From: Igor Fedotov Date: Mon, 8 Nov 2021 12:14:46 +0000 (+0300) Subject: osd: report error and fail if store returns no meta collection X-Git-Tag: v17.1.0~275^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=96d7bbd53a394375e468e324001c188c5f6798ca;p=ceph-ci.git osd: report error and fail if store returns no meta collection Signed-off-by: Igor Fedotov --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 5b73d77d006..15a90aede62 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -3479,6 +3479,10 @@ int OSD::init() store->set_cache_shards(get_num_cache_shards()); + int rotating_auth_attempts = 0; + auto rotating_auth_timeout = + g_conf().get_val("rotating_keys_bootstrap_timeout"); + int r = store->mount(); if (r < 0) { derr << "OSD:init: unable to mount object store" << dendl; @@ -3493,7 +3497,12 @@ int OSD::init() dout(2) << "boot" << dendl; service.meta_ch = store->open_collection(coll_t::meta()); - + if (!service.meta_ch) { + derr << "OSD:init: unable to open meta collection" + << dendl; + r = -ENOENT; + goto out; + } // initialize the daily loadavg with current 15min loadavg double loadavgs[3]; if (getloadavg(loadavgs, 3) == 3) { @@ -3503,10 +3512,6 @@ int OSD::init() daily_loadavg = 1.0; } - int rotating_auth_attempts = 0; - auto rotating_auth_timeout = - g_conf().get_val("rotating_keys_bootstrap_timeout"); - // sanity check long object name handling { hobject_t l;