From: Samuel Just Date: Tue, 21 May 2013 22:22:56 +0000 (-0700) Subject: OSDMonitor: skip new pools in update_pools_status() and get_pools_health() X-Git-Tag: v0.63~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0289c445be0269157fa46bbf187c92639a13db46;p=ceph.git 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 --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index a0be0ec2af61..02959c207573 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -2260,6 +2260,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; @@ -2309,6 +2311,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;