Skip to content

mgr/progress: Look at PG state when PG epoch >= OSDMap epoch - #28368

Merged
tchaikov merged 3 commits into
ceph:masterfrom
kamoltat:wip-progress-module-pg-osdmap-comparison
Jun 8, 2019
Merged

tchaikov merged 3 commits into
ceph:masterfrom
kamoltat:wip-progress-module-pg-osdmap-comparison

Conversation

@kamoltat

@kamoltat kamoltat commented Jun 3, 2019

Copy link
Copy Markdown
Member

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]

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

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]>
@gregsfortytwo

Copy link
Copy Markdown
Member

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.

Comment thread src/pybind/mgr/progress/module.py Outdated
return self. _evacuate_osds

def pg_update(self, pg_dump, log):
def pg_update(self, pg_dump, log,latest_osd_map_epoch):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: space after ,

Comment thread src/pybind/mgr/progress/module.py Outdated
# 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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: space after the #

Comment thread src/pybind/mgr/progress/module.py Outdated
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())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: space after ,

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]>
@liewegas

liewegas commented Jun 4, 2019 •

Copy link
Copy Markdown
Member

i think you want ot modify the PgRecoveryEvent ctor

    def __init__(self, message, refs, which_pgs, evacuate_osds):

to take the osdmap epoch at the time the event is created. Store it in self->_start_epoch or something. Then when pg_update is called you don't need an extra argument at all... just compare against self->_start_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.

Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>

@liewegas liewegas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice and simple! :)

@liewegas liewegas changed the title mgr: Look at PG state when PG epoch >= OSDMap epoch mgr/progress: Look at PG state when PG epoch >= OSDMap epoch Jun 4, 2019
@jdurgin

jdurgin commented Jun 4, 2019

Copy link
Copy Markdown
Member

jenkins: retest this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants