From bee6ced27699445a77979cc737c4a2fbc6a58990 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 12 Feb 2018 18:00:02 -0600 Subject: [PATCH] mon/MonClient: tolerate pre-mimic mons Return success if the mons are pre-mimic (and thus have no config). Signed-off-by: Sage Weil --- src/mon/MonClient.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index 75a66b8d0981e..2ccea89079f15 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: -- 2.39.5