This is, strictly speaking, redundant, since the osd_stat is also in the
digest, but we plan to remove that.
Signed-off-by: Sage Weil <sage@redhat.com>
Report a sequence number when we flush_pg_stats. Combine the up_from and
a per-boot seq number to get a monotonically increasing value across OSD
restarts (we assume less than 4 billion stats reports in a single epoch).
Signed-off-by: Sage Weil <sage@redhat.com>
Once the OSDMap flag is set there is no going back. Zero out the on-disk
PGMap data, and clear the in-memory PGMap to free up memory and make
bugs easier to spot.
Signed-off-by: Sage Weil <sage@redhat.com>
There is overhead for PGs we are creating because the mon has to track
which OSD each one current maps to. This can be problematic on a very
large cluster. Limit the overhead by setting a cap on the number of PGs
we are creating at once; leave the rest in a persistent queue.
Signed-off-by: Sage Weil <sage@redhat.com>
We are not persisiting the updated creating_pgs here; this is bad! I'm
not sure why it was there to begin with?
Signed-off-by: Sage Weil <sage@redhat.com>
I'm not rewriting this to use range iterator syntax because I'm in a
hurry. This just lets me change the types without touching all this code
again.
Signed-off-by: Sage Weil <sage@redhat.com>
Leave the legacy full/nearfull stuff in PGMonitor (although we'll still
need to clean out the PGMap fields too).
This is cut and paste, some stripping of pg_map., g_conf -> cct->_conf,
and a bit of whitespace cleanup.
Signed-off-by: Sage Weil <sage@redhat.com>
* add override specifier
* s/parent/pgmap/
* remove unnecessary forward declarations
* make `pg_map` and `pgservice` private member variables.
* formatting changes: wrap at 80, for example.
* define maybe_add_creating_pgs() instead of get_pg_stat()
* use unique_ptr<PGMapStatService> for holding the pointer.
Signed-off-by: Kefu Chai <kchai@redhat.com>
replace get_pg_stat() with maybe_trim_creating_pgs(), so it is more
symmetric: maybe_add_creating_pgs() versus maybe_trim_creating_pgs().
and we don't need to return a pointer which is always valid. a const
reference is a better fit in this case.
Signed-off-by: Kefu Chai <kchai@redhat.com>
we don't send pgstat to mon from osd once we set
CEPH_OSDMAP_REQUIRE_LUMINOUS. and cleanup the pgstat queue when we
do the switch.
Signed-off-by: Kefu Chai <kchai@redhat.com>
We don't want this is MgrMonitor or else the MgrMap epoch will roll over
every few seconds when we get a mgr report. Also, it's nice to keep this
service separate from the unrelated MgrMap management.
Signed-off-by: Sage Weil <sage@redhat.com>
Many of these are only needed to support PGMonitor. Implement those
in the parent and make them ceph_abort() so that the new child can avoid
the clutter.
Signed-off-by: Sage Weil <sage@redhat.com>
Everything summary-ish that we need to send to the mon is moved into a
parent class. The child PGMap retains the detail.
The parent gets its own encode(), and PGMap::encode_digest() will call it
to encode just the summary info.
Squashed in here is a new num_pg_by_osd that could have been done
in a preceding patch but I did things in the wrong order. :(
Signed-off-by: Sage Weil <sage@redhat.com>
Once we set the luminous flag we shouldn't need this anymore. In fact,
we should stop needing this immediately after we set the monitor
luminous flag.
Signed-off-by: Sage Weil <sage@redhat.com>
Right now they pretty much just copy the PGMapStatService, but it'll
let us slim down the MgrMonitor's one more easily.
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
The only one left now is where the OSDMonitor triggers
PGMonitor::check_osd_map() and that's going to die post-Luminous,
so no need to do anything fancy with it.
Signed-off-by: Greg Farnum <gfarnum@redhat.com>