]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: Look at PG state when PG epoch >= OSDMap epoch
authorKamoltat (Junior) Sirivadhna <ksirivad@redhat.com>
Mon, 3 Jun 2019 19:23:45 +0000 (15:23 -0400)
committerkamoltat <ksirivad@redhat.com>
Sat, 21 Nov 2020 06:45:18 +0000 (06:45 +0000)
add an if statement to only allow PGs to
only look at it's PG state when it's epoch
is greater than or equal to the OSDMap's
epoch.

cherry picked from commit 21e1caba6df9d591ebff54939d020ce0a3e57efe

Signed-off-by: Kamoltat <ksirivad@redhat.com>
src/pybind/mgr/progress/module.py

index adee58749a11e25e283f758952d98b271de23fa4..77df5d81bbde3655d7c81e9e333f9d1335102408 100644 (file)
@@ -229,6 +229,9 @@ class PgRecoveryEvent(Event):
                 # The PG is gone!  Probably a pool was deleted. Drop it.
                 complete.add(pg)
                 continue
+            #Only checks the state of each PGs when it's epoch >= the OSDMap's epoch
+            if int(info['reported_epoch']) < int(latest_osd_map_epoch):
+                continue
 
             state = info['state']