]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MonClient: tolerate pre-mimic mons
authorSage Weil <sage@redhat.com>
Tue, 13 Feb 2018 00:00:02 +0000 (18:00 -0600)
committerSage Weil <sage@redhat.com>
Tue, 6 Mar 2018 20:44:50 +0000 (14:44 -0600)
Return success if the mons are pre-mimic (and thus have no config).

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/MonClient.cc

index 75a66b8d0981e8e9deb0e49202d2d6c0f94af22c..2ccea89079f15b8852ff8aff064ae4508ca8cf71 100644 (file)
@@ -127,19 +127,20 @@ int MonClient::get_monmap_and_config()
        ceph::features::mon::FEATURE_MIMIC)) {
     ldout(cct,10) << __func__ << " pre-mimic monitor, no config to fetch"
                  << dendl;
+    r = 0;
   } else {
     Mutex::Locker l(monc_lock);
     while (!got_config) {
       ldout(cct,20) << __func__ << " waiting for config" << dendl;
       map_cond.WaitInterval(monc_lock, interval);
     }
-  }
-  if (got_config) {
-    ldout(cct,10) << __func__ << " success" << dendl;
-    r = 0;
-  } else {
-    lderr(cct) << __func__ << " failed to get config" << dendl;
-    r = -EIO;
+    if (got_config) {
+      ldout(cct,10) << __func__ << " success" << dendl;
+      r = 0;
+    } else {
+      lderr(cct) << __func__ << " failed to get config" << dendl;
+      r = -EIO;
+    }
   }
 
 out_shutdown: