From f999e8aa544139a98f83659bb44fc38454af8388 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 4 Jan 2018 14:55:56 -0600 Subject: [PATCH] mon/ConfigMonitor: always send initial config, even if empty Signed-off-by: Sage Weil --- src/mon/ConfigMonitor.cc | 3 ++- src/mon/Session.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mon/ConfigMonitor.cc b/src/mon/ConfigMonitor.cc index d1a12a3eb80..990320cb0b8 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 a45e8c02e78..aafd35c7760 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), -- 2.39.5