Skip to content

Commit

Permalink
PGMonitor: unconfuse object count skew message
Browse files Browse the repository at this point in the history
"Pool <pool> has too few pgs" is okay assuming it does not take other
pools into account. And since it does, it is confusing in the following
scenario:

1. Create two pools, one with small pg count and one with large
   pg count
2. Put a whole lot of objects in smaller pool, resulting in "too few
   pgs" warning on that pool, which is expected behavior.
3. Put a whole lot of objects in larger pool, warning goes away.
   Suddenly smaller pool has plenty of PGs?

Current message suggests adding more nodes (or PGs) to pool, when
actually it's warning about significantly more objects in that
particular pool than in the other pools.

Signed-off-by: Piotr Dałek <[email protected]>
  • Loading branch information
Piotr Dałek committed Mar 3, 2016
1 parent 8c054f7 commit f792a3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mon/PGMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2395,7 +2395,7 @@ void PGMonitor::get_health(list<pair<health_status_t,string> >& summary,
if (g_conf->mon_pg_warn_max_object_skew > 0 &&
ratio > g_conf->mon_pg_warn_max_object_skew) {
ostringstream ss;
ss << "pool " << name << " has too few pgs";
ss << "pool " << name << " has many more objects per pg than average (too few pgs?)";
summary.push_back(make_pair(HEALTH_WARN, ss.str()));
if (detail) {
ostringstream ss;
Expand Down

0 comments on commit f792a3f

Please sign in to comment.