From: Sage Weil Date: Thu, 4 Jan 2018 20:55:56 +0000 (-0600) Subject: mon/ConfigMonitor: always send initial config, even if empty X-Git-Tag: v13.0.2~78^2~108 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f999e8aa544139a98f83659bb44fc38454af8388;p=ceph.git mon/ConfigMonitor: always send initial config, even if empty Signed-off-by: Sage Weil --- diff --git a/src/mon/ConfigMonitor.cc b/src/mon/ConfigMonitor.cc index d1a12a3eb80be..990320cb0b82b 100644 --- a/src/mon/ConfigMonitor.cc +++ b/src/mon/ConfigMonitor.cc @@ -305,13 +305,14 @@ bool ConfigMonitor::refresh_config(MonSession *s) device_class, &out); - if (out == s->last_config) { + if (out == s->last_config && s->any_config) { dout(20) << __func__ << " no change, " << out << dendl; return false; } dout(20) << __func__ << " " << out << dendl; s->last_config = out; + s->any_config = true; return true; } diff --git a/src/mon/Session.h b/src/mon/Session.h index a45e8c02e78a7..aafd35c776044 100644 --- a/src/mon/Session.h +++ b/src/mon/Session.h @@ -62,6 +62,7 @@ struct MonSession : public RefCountedObject { string remote_host; ///< remote host name map last_config; ///< most recently shared config + bool any_config = false; MonSession(const entity_inst_t& i, Connection *c) : RefCountedObject(g_ceph_context),