From: Kamoltat (Junior) Sirivadhna Date: Tue, 4 Jun 2019 15:51:01 +0000 (-0400) Subject: mgr: Look at PG state when PG epoch >= OSDMap epoch X-Git-Tag: v14.2.17~114^2~1^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9b453153f209f1b4e6d8edb8ae385f4c25fbc17d;p=ceph.git mgr: Look at PG state when PG epoch >= OSDMap epoch In the PgRecoveryEvent class created a property call self._start_epoch, basically the epoch of the current OSD. Then use that propery in pg_update to only allow the program to look at PG state only when PG epoch >= start_epoch. (cherry picked from commit d37e8a4d84d873b7df264c63077805be8618ad7a) Signed-off-by: Kamoltat --- diff --git a/src/pybind/mgr/progress/module.py b/src/pybind/mgr/progress/module.py index 32bd82c5f31..9236001ebb8 100644 --- a/src/pybind/mgr/progress/module.py +++ b/src/pybind/mgr/progress/module.py @@ -184,6 +184,8 @@ class PgRecoveryEvent(Event): self._progress = 0.0 + self._start_epoch = _module.get_osdmap().get_epoch() + self.id = str(uuid.uuid4()) self._refresh() @@ -230,7 +232,7 @@ class PgRecoveryEvent(Event): 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(start_epoch): + if int(info['reported_epoch']) < int(self._start_epoch): continue state = info['state']