Repository navigation
mgr/progress: Look at PG state when PG epoch >= OSDMap epoch - #28368
Conversation
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. Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>
|
Is this fixing some bug in the mgr I don't understand? In general PGs are going to be behind the OSDMap's newest epoch, and they certainly can't exceed it. So I'm not sure why you'd want to ignore updates just because they are a bit idle and haven't processed all the way to the newest cluster config. |
| return self. _evacuate_osds | ||
|
|
||
| def pg_update(self, pg_dump, log): | ||
| def pg_update(self, pg_dump, log,latest_osd_map_epoch): |
There was a problem hiding this comment.
instead of latest_osd_map_epoch, we want something like start_epoch on the progress event. add a property there that gets the (current) osdmap when the event is created, and compare against that
| # 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 |
| evacuate_osds=[osd_id] | ||
| ) | ||
| ev.pg_update(self.get("pg_dump"), self.log) | ||
| ev.pg_update(self.get("pg_dump"), self.log,self._latest_osdmap.get_epoch()) |
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. Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>
|
i think you want ot modify the PgRecoveryEvent ctor to take the osdmap epoch at the time the event is created. Store it in |
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. Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>
|
jenkins: retest this please |
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.
Signed-off-by: Kamoltat (Junior) Sirivadhna [email protected]