osd/osd_types: include up and acting count in pool_sum_t

Sum up the up and acting instances of the PGs in the pool.

Signed-off-by: Sage Weil <sage@redhat.com>
mon/PGMap: allow stat_pg_{add,sub} that only touches stats

Some callers don't want the auxiliary structures to be updated because
they are (a) traversing them and (b) the relevant fields are not being
changed.  Allow it.

Signed-off-by: Sage Weil <sage@redhat.com>
mon/PGMonitor: fix summation when we adjust up/acting

We're touching up/acting, which now affect the sum.

Signed-off-by: Sage Weil <sage@redhat.com>
mon/PGMonitor: make min pg warning based on pg *instances*

This makes the effective number of PGs we are using the number of instances
of PGs on an OSD, not the nubmer of PGs an OSD will be primary for.  Our
check becomes less aggressive since we are now less likely to trigger a
warning.

Signed-off-by: Sage Weil <sage@redhat.com>
mon/PGMonitor: add max pgs per osd warning

This is just like the min warning, but a max.  It should help warn users
away from having too many PGs in their cluster, which can be very
dangerous.

Signed-off-by: Sage Weil <sage@redhat.com>
mon: tighten pg vs osd warning bounds to 3x above/below 100 (target)

Previously we were warning at (effectively) 60, so this is still less
noisy than before on the min.  The max threshold is new.

Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2788 from ceph/wip-warn-max-pg

mon: warn when there are too many pgs per osd

Reviewed-by: Joao Eduardo Luis <joao@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>