From f87a19d34f9a03493eaca654dd176992676c5812 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 21 May 2013 15:22:56 -0700 Subject: [PATCH] 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 Reviewed-by: Sage Weil (cherry picked from commit 0289c445be0269157fa46bbf187c92639a13db46) --- src/mon/OSDMonitor.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 9582609fdec21..2370ba3c8d4c8 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -2263,6 +2263,8 @@ bool OSDMonitor::update_pools_status() for (map::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& pools = osdmap.get_pools(); for (map::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; -- 2.39.5