]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon: notify_new_monmap via MonmapMonitor::init
authorPatrick Donnelly <pdonnell@ibm.com>
Fri, 13 Jun 2025 19:14:55 +0000 (15:14 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Mon, 22 Sep 2025 16:34:40 +0000 (12:34 -0400)
Otherwise, configurations are not updated during startup.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit 51a2bab8ed48b2dc698ac4eeede48d94175b1851)

src/mon/MonmapMonitor.cc
src/mon/MonmapMonitor.h

index 61942da6d8e4d3d345b4cc2b2493029bed0cf015..c73e1958c9e8bc79e636c37e4267b25946beec55 100644 (file)
@@ -125,6 +125,12 @@ void MonmapMonitor::update_from_paxos(bool *need_bootstrap)
   mon.notify_new_monmap(true);
 }
 
+void MonmapMonitor::init()
+{
+  /* init relevant Monitor state */
+  mon.notify_new_monmap(false, false);
+}
+
 void MonmapMonitor::create_pending()
 {
   pending_map = *mon.monmap;
index dc75e9620b2b4d07353d31f2c01a50aac4f9df50..40aa3fbc474657cb5448b0c37f3590dcb6dc9539 100644 (file)
@@ -37,6 +37,8 @@ class MonmapMonitor : public PaxosService {
   }
   MonMap pending_map; //the pending map awaiting passage
 
+  void init() override;
+
   void create_initial() override;
 
   void update_from_paxos(bool *need_bootstrap) override;