summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-06-26 06:53:08 -0700
committerSage Weil <sage@inktank.com>2013-06-28 15:43:58 -0700
commite11f258831e14dc3755e09c0fd4f9bfdf79022a7 (patch)
treef80a76056d9f1c3d7269313d11939ecdf3eb1701
parent4d07fb014178da3c88edeb8765e1aaacb8cb8ffa (diff)
downloadceph-e11f258831e14dc3755e09c0fd4f9bfdf79022a7.tar.gz
mon/PGMonitor: use post_paxos_update, not init, to refresh from osdmap
We do two things here: - make init an one-time unconditional init method, which is what the health service expects/needs. - switch PGMonitor::init to be post_paxos_update() which is called after the other services update, which is what PGMonitor really needs. This is a new version of the fix originally in commit a2fe0137946541e7b3b537698e1865fbce974ca6 (and those around it). That is, this re-fixes a problem where osds do not see pg creates from their subscribe due to map_pg_creates() not getting called. Backport: cuttlefish Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit e635c47851d185eda557e36bdc4bf3775f7b87a2) Conflicts: src/mon/PGMonitor.cc src/mon/PGMonitor.h
-rw-r--r--src/mon/Monitor.cc10
-rw-r--r--src/mon/PGMonitor.cc2
-rw-r--r--src/mon/PGMonitor.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc
index 89778053cfc..1ca6de2987e 100644
--- a/src/mon/Monitor.cc
+++ b/src/mon/Monitor.cc
@@ -514,14 +514,14 @@ void Monitor::init_paxos()
dout(10) << __func__ << dendl;
paxos->init();
+ // init services
+ for (int i = 0; i < PAXOS_NUM; ++i) {
+ paxos_service[i]->init();
+ }
+
// update paxos
if (paxos->is_consistent()) {
refresh_from_paxos(NULL);
-
- // init services
- for (int i = 0; i < PAXOS_NUM; ++i) {
- paxos_service[i]->init();
- }
}
}
diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc
index da648c77dfa..ae504c1221b 100644
--- a/src/mon/PGMonitor.cc
+++ b/src/mon/PGMonitor.cc
@@ -219,7 +219,7 @@ void PGMonitor::update_from_paxos(bool *need_bootstrap)
update_logger();
}
-void PGMonitor::init()
+void PGMonitor::post_paxos_update()
{
if (mon->osdmon()->osdmap.get_epoch()) {
map_pg_creates();
diff --git a/src/mon/PGMonitor.h b/src/mon/PGMonitor.h
index 7f04fec1256..e15b33cc886 100644
--- a/src/mon/PGMonitor.h
+++ b/src/mon/PGMonitor.h
@@ -52,7 +52,7 @@ private:
void create_initial();
void update_from_paxos(bool *need_bootstrap);
- void init();
+ void post_paxos_update();
void handle_osd_timeouts();
void create_pending(); // prepare a new pending
// propose pending update to peers