]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: check for monclient::init() error
authorSage Weil <sage@newdream.net>
Thu, 29 Dec 2011 19:24:12 +0000 (11:24 -0800)
committerSage Weil <sage@newdream.net>
Thu, 29 Dec 2011 19:24:12 +0000 (11:24 -0800)
I think this fixes #1835.

Signed-off-by: Sage Weil <sage@newdream.net>
src/librados.cc

index bd118d8d70b9cef3826cf8bd8c25f6079b1a7e44..6e402abd7d9ee05e1682a626ec009bf06e7947a6 100644 (file)
@@ -952,7 +952,12 @@ int librados::RadosClient::connect()
   ldout(cct, 1) << "setting wanted keys" << dendl;
   monclient.set_want_keys(CEPH_ENTITY_TYPE_MON | CEPH_ENTITY_TYPE_OSD);
   ldout(cct, 1) << "calling monclient init" << dendl;
-  monclient.init();
+  err = monclient.init();
+  if (err) {
+    ldout(cct, 0) << conf->name << " initialization error " << cpp_strerror(-err) << dendl;
+    shutdown();
+    goto out;
+  }
 
   err = monclient.authenticate(conf->client_mount_timeout);
   if (err) {