]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: Look at PG state when PG epoch >= OSDMap epoch
authorKamoltat (Junior) Sirivadhna <ksirivad@redhat.com>
Tue, 4 Jun 2019 14:32:04 +0000 (10:32 -0400)
committerkamoltat <ksirivad@redhat.com>
Sat, 21 Nov 2020 06:45:18 +0000 (06:45 +0000)
add a property in pg_update that gets the
(current) OSDMap when the event is
created, and compare PG epoch with
OSDMap epoch. Also made some changes
on the spacing of things.

(cherry picked from commit f618e56c93ad82a20ab844fddc3d2ded42f2a48e)

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

index 77df5d81bbde3655d7c81e9e333f9d1335102408..32bd82c5f313d9616c503ca8e2aa987bc076a29f 100644 (file)
@@ -229,8 +229,8 @@ 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):
+            # Only checks the state of each PGs when it's epoch >= the OSDMap's epoch
+            if int(info['reported_epoch']) < int(start_epoch):
                 continue
 
             state = info['state']