]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/ConfigMonitor: always send initial config, even if empty
authorSage Weil <sage@redhat.com>
Thu, 4 Jan 2018 20:55:56 +0000 (14:55 -0600)
committerSage Weil <sage@redhat.com>
Tue, 6 Mar 2018 20:44:48 +0000 (14:44 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/ConfigMonitor.cc
src/mon/Session.h

index d1a12a3eb80bee0c89c4238a35f21d56b462fbab..990320cb0b82bedf9ddab149294a1005ee876b55 100644 (file)
@@ -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;
 }
 
index a45e8c02e78a70723be2d0d5db4b810c72c1f1a3..aafd35c776044d3c97feacce0628852bc19e550b 100644 (file)
@@ -62,6 +62,7 @@ struct MonSession : public RefCountedObject {
 
   string remote_host;                ///< remote host name
   map<string,string> last_config;    ///< most recently shared config
+  bool any_config = false;
 
   MonSession(const entity_inst_t& i, Connection *c) :
     RefCountedObject(g_ceph_context),