summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-05-21 15:22:56 -0700
committerSamuel Just <sam.just@inktank.com>2013-05-31 10:59:58 -0700
commitf87a19d34f9a03493eaca654dd176992676c5812 (patch)
tree31c9254164460d8d7c03f9e91869f6f20f7ba390
parent34733bdc3b9da13195dfac8a25f98c6de64070d7 (diff)
downloadceph-f87a19d34f9a03493eaca654dd176992676c5812.tar.gz
OSDMonitor: skip new pools in update_pools_status() and get_pools_health()
New pools won't be full. mon->pgmon()->pg_map.pg_pool_sum[poolid] will implicitly create an entry for poolid causing register_new_pgs() to assume that the newly created pgs in the new pool are in fact a result of a split preventing MOSDPGCreate messages from being sent out. Fixes: #4813 Backport: cuttlefish Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> (cherry picked from commit 0289c445be0269157fa46bbf187c92639a13db46)
-rw-r--r--src/mon/OSDMonitor.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc
index 9582609fdec..2370ba3c8d4 100644
--- a/src/mon/OSDMonitor.cc
+++ b/src/mon/OSDMonitor.cc
@@ -2263,6 +2263,8 @@ bool OSDMonitor::update_pools_status()
for (map<int64_t,pg_pool_t>::const_iterator it = pools.begin();
it != pools.end();
++it) {
+ if (!mon->pgmon()->pg_map.pg_pool_sum.count(it->first))
+ continue;
pool_stat_t& stats = mon->pgmon()->pg_map.pg_pool_sum[it->first];
object_stat_sum_t& sum = stats.stats.sum;
const pg_pool_t &pool = it->second;
@@ -2312,6 +2314,8 @@ void OSDMonitor::get_pools_health(
const map<int64_t,pg_pool_t>& pools = osdmap.get_pools();
for (map<int64_t,pg_pool_t>::const_iterator it = pools.begin();
it != pools.end(); ++it) {
+ if (!mon->pgmon()->pg_map.pg_pool_sum.count(it->first))
+ continue;
pool_stat_t& stats = mon->pgmon()->pg_map.pg_pool_sum[it->first];
object_stat_sum_t& sum = stats.stats.sum;
const pg_pool_t &pool = it->second;