From: Sage Weil Date: Tue, 13 Feb 2018 00:00:02 +0000 (-0600) Subject: mon/MonClient: tolerate pre-mimic mons X-Git-Tag: v13.0.2~78^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bee6ced27699445a77979cc737c4a2fbc6a58990;p=ceph.git mon/MonClient: tolerate pre-mimic mons Return success if the mons are pre-mimic (and thus have no config). Signed-off-by: Sage Weil --- diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index 75a66b8d0981..2ccea89079f1 100644 --- a/src/mon/MonClient.cc +++ b/src/mon/MonClient.cc @@ -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: