We rely on that if a rados ref is initialized it contains the
valid context.
Signed-off-by: Mykola Golub <mgolub@suse.com>
const std::string &description,
RadosRef *rados_ref,
bool strip_cluster_overrides) {
- rados_ref->reset(new librados::Rados());
-
// NOTE: manually bootstrap a CephContext here instead of via
// the librados API to avoid mixing global singletons between
// the librados shared library and the daemon
cct->_conf.apply_changes(nullptr);
cct->_conf.complain_about_parse_error(cct);
+ rados_ref->reset(new librados::Rados());
+
r = (*rados_ref)->init_with_context(cct);
ceph_assert(r == 0);
cct->put();