]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PeeringState: do not complain about past_intervals constrained by oldest epoch 30222/head
authorSage Weil <sage@redhat.com>
Mon, 19 Aug 2019 21:32:22 +0000 (16:32 -0500)
committerNathan Cutler <ncutler@suse.com>
Sat, 7 Sep 2019 07:25:22 +0000 (09:25 +0200)
The start of the required interval has a floor set by the oldest osdmap
epoch we have.  That can lead to an invalid/empty required interval
(because the start is >= the end), but the PG may still have past
intervals.  That can be cause by a slow PG deletion.

No need to complain about this harmless condition.

Fixes: https://tracker.ceph.com/issues/39546
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit b1396774a40b7b3e54c9f52b6bb6f03d31c35401)

Conflicts:
src/osd/PeeringState.cc
- file does not exist in mimic; made the changes manually in src/osd/PG.cc
- mimic has a different way of getting the oldest osdmap

src/osd/PG.cc

index bef3213940128452409bbc2e6bb13bcf98db6984..ebbf71ff19a7aa06c37226d2e862e353428d188f 100644 (file)
@@ -896,11 +896,15 @@ bool PG::needs_backfill() const
 
 void PG::check_past_interval_bounds() const
 {
+  auto oldest_epoch = osd->get_superblock().oldest_map;
   auto rpib = get_required_past_interval_bounds(
     info,
-    osd->get_superblock().oldest_map);
+    oldest_epoch);
   if (rpib.first >= rpib.second) {
-    if (!past_intervals.empty()) {
+    // do not warn if the start bound is dictated by oldest_map; the
+    // past intervals are presumably appropriate given the pg info.
+    if (!past_intervals.empty() &&
+       rpib.first > oldest_epoch) {
       osd->clog->error() << info.pgid << " required past_interval bounds are"
                         << " empty [" << rpib << ") but past_intervals is not: "
                         << past_intervals;