Skip to content

Commit

Permalink
Merge pull request ceph#640 from ceph/wip-mon-pgmap
Browse files Browse the repository at this point in the history
fix mon crash when osdmap and pgmap aren't yet synced

Reviewed-by: Joao Eduardo Luis <[email protected]>
  • Loading branch information
Sage Weil committed Sep 25, 2013
2 parents aead63c + 4d8f78b commit 52c7f27
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mon/PGMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit 52c7f27

Please sign in to comment.