]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados/librados.cc rados_conf_read_file: report errors to client
authorDan Mick <dan.mick@redhat.com>
Mon, 24 Apr 2017 22:37:49 +0000 (15:37 -0700)
committerDan Mick <dan.mick@redhat.com>
Mon, 24 Apr 2017 22:55:16 +0000 (15:55 -0700)
Previously all the error text was hidden; log it.
Note: ENOENT is noted as a 'parse error'

Signed-off-by: Dan Mick <dan.mick@redhat.com>
src/librados/librados.cc

index fa6d61eb6d16cdcfe69dc1c8b69bbc978dbe8ab3..44a632f02953f5d5793fa1312023e7f126916e91 100644 (file)
@@ -2820,8 +2820,12 @@ extern "C" int rados_conf_read_file(rados_t cluster, const char *path_list)
   tracepoint(librados, rados_conf_read_file_enter, cluster, path_list);
   librados::RadosClient *client = (librados::RadosClient *)cluster;
   md_config_t *conf = client->cct->_conf;
-  int ret = conf->parse_config_files(path_list, NULL, 0);
+  ostringstream warnings;
+  int ret = conf->parse_config_files(path_list, &warnings, 0);
   if (ret) {
+    if (warnings.str().length())
+      lderr(client->cct) << warnings.str() << dendl;
+    client->cct->_conf->complain_about_parse_errors(client->cct);
     tracepoint(librados, rados_conf_read_file_exit, ret);
     return ret;
   }