Repository navigation
mgr/progress: Add recovery event when OSD marked in - #28498
Conversation
Basically keeps track of affected PGs similar to how funciton _osd_out works but instead of tracking up+acting set we only care about acting. Also made a minor change on the function pg_update: we consider pg to be complete when it is active and clean and nothing else. Removed the variable "unmoved" since If the pg wasn't moved, we shouldn't have an event for it in the first place. Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>
|
jenkins, retest this please. |
| self._events[ev.id] = ev | ||
|
|
||
| def _osd_in(self, osd_id): | ||
| def _osd_in(self, old_map, old_dump, new_map, osd_id): |
There was a problem hiding this comment.
since this is almost the same as _osd_out(), perhaps they could be combined into a single method with a parameter for in/out
| for pool in old_dump['pools']: | ||
| pool_id = pool['pool'] | ||
| for ps in range(0, pool['pg_num']): | ||
| up_acting = old_map.pg_to_up_acting_osds(pool['pool'], ps) |
There was a problem hiding this comment.
for an osd being marked in, being in the new acting set, but not the old acting set, would be expected
| up_acting = old_map.pg_to_up_acting_osds(pool['pool'], ps) | ||
|
|
||
| # Was this OSD affected by the OSD coming in? | ||
| old_osds = set(up_acting['acting']) |
There was a problem hiding this comment.
@liewegas do you remember why the _osd_out case considers up + acting changes? since the current placement is defined by acting, it seems intuitive to only look at that
Combine the functions _osd_in and _osd_out in to a single function call _osd_in_out, which has a parameter called marked (string) that will indicate if the event is when an osd is marked in or out. Consider only the 'acting' set of an osd for both when 'in' and 'out' event of the osd to calculate affected PGs Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>
| old_osds = set(old_up_acting['acting']) | ||
|
|
||
| was_on_out_osd = osd_id in old_osds | ||
| if not was_on_out_osd: |
There was a problem hiding this comment.
this check for the osd_id being in the acting set could be checking both the old and new maps, to cover both out and in cases, respectively
|
looks good! just one comment on the osd_id check |
Added the check for osd_id to account for the acting set of both the old and new maps to cover both osd marked out and in respectively Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>
Basically keeps track of affected PGs
similar to how funciton _osd_out works
but instead of tracking up+acting set
we only care about acting. Also made
a minor change on the function pg_update:
we consider pg to be complete when it
is active and clean and nothing else.
Removed the variable "unmoved" since
If the pg wasn't moved, we shouldn't
have an event for it in the first place.
Signed-off-by: Kamoltat (Junior) Sirivadhna [email protected]