If one or more of the default search paths throw an error like
-EPERM, no longer abort the attempt to connect to the cluster.
Previously, after dropping privileges librados would attempt to
access "/root/.ceph/<cluster name>.conf" and would fail due to
the error, even if all the necessary data to connect was available
via the mon config-key store.
Fixes: https://tracker.ceph.com/issues/41356
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
// librados::Rados::conf_read_file
int r = cct->_conf.parse_config_files(nullptr, nullptr, 0);
if (r < 0 && r != -ENOENT) {
+ // do not treat this as fatal, it might still be able to connect
derr << "could not read ceph conf for " << description << ": "
<< cpp_strerror(r) << dendl;
- cct->put();
- return r;
}
// preserve cluster-specific config settings before applying environment/cli