mirror of
https://github.com/ceph/ceph
synced 2024-12-28 22:43:29 +00:00
Merge pull request #640 from ceph/wip-mon-pgmap
fix mon crash when osdmap and pgmap aren't yet synced Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
This commit is contained in:
commit
52c7f27963
@ -1865,6 +1865,8 @@ void PGMonitor::get_health(list<pair<health_status_t,string> >& summary,
|
||||
p != pg_map.pg_pool_sum.end();
|
||||
++p) {
|
||||
const pg_pool_t *pi = mon->osdmon()->osdmap.get_pg_pool(p->first);
|
||||
if (!pi)
|
||||
continue; // in case osdmap changes haven't propagated to PGMap yet
|
||||
if (pi->get_pg_num() > pi->get_pgp_num()) {
|
||||
ostringstream ss;
|
||||
ss << "pool " << mon->osdmon()->osdmap.get_pool_name(p->first) << " pg_num "
|
||||
|
Loading…
Reference in New Issue
Block a user