Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pacific: mgr/progress: optimize global recovery && introduce 5 seconds interval #43353

Merged
merged 5 commits into from Oct 26, 2021

Conversation

kamoltat
Copy link
Member

@kamoltat kamoltat commented Sep 29, 2021

Backport tracker: https://tracker.ceph.com/issues/52794

This backport includes:

  1. Optimizing the global recovery event in the progress module: we directly get the active+clean status pgs from the C++ side instead of calling pg_map and looping through it.
  2. Introduce 5 seconds sleep interval for the progress module: we only check for pg_stats and osdmap only every 5 seconds instead of checking for every notification we get, as this was proven to be expensive in the past.
  3. Delay event recovery process in qa/tasks/mgr/progress: since we are checking the progress module every 5 seconds, we need to give our test cases more time to complete their events.
  4. remove unnecessary type casting for reported_epoch.

Backporting the relevant commits from master PRs:
#37544
#41907
#42034

Signed-off-by: Kamoltat ksirivad@redhat.com

Checklist

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

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@kamoltat kamoltat added this to the pacific milestone Sep 29, 2021
@kamoltat kamoltat self-assigned this Sep 29, 2021
@github-actions github-actions bot added the tests label Sep 29, 2021
@kamoltat kamoltat force-pushed the wip-ksirivad-backport-pacific-37544 branch from f5c026f to 9027323 Compare September 29, 2021 19:20
@kamoltat kamoltat changed the title Wip ksirivad backport pacific 37544 pacific: mgr/progress: optimize global recovery && introduce 5 seconds interval Sep 29, 2021
@kamoltat kamoltat force-pushed the wip-ksirivad-backport-pacific-37544 branch from 9027323 to c6c70c8 Compare September 30, 2021 13:18
@kamoltat kamoltat requested a review from a team as a code owner September 30, 2021 13:18
@kamoltat kamoltat requested review from avanthakkar and pereman2 and removed request for a team September 30, 2021 13:18
…art_epoch

reported_epoch is an int, see 22128e3
and _start_epoch is also an int, see type annotations in
2af2afa

Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit da268fa)
Signed-off-by: Kamoltat <ksirivad@redhat.com>
@kamoltat kamoltat force-pushed the wip-ksirivad-backport-pacific-37544 branch from c6c70c8 to ddc3ad9 Compare September 30, 2021 13:23
@kamoltat kamoltat requested review from jdurgin and removed request for avanthakkar and pereman2 September 30, 2021 13:24
neha-ojha and others added 4 commits September 30, 2021 13:33
because reported_epoch is an int, not a string

Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit a8f3a0e)
Current progress module only checks pg stats
and osdmap when it is notified by the cluster.
However, this is expensive in large cluster
with many pools and osds. we
change it to only check both pg stats and osdmap
every 5 seconds.

in the function _osd_in_out() we now calculate
`is_relocated` by: old_osds != new_osds such that
it does not matter if the difference between osds
are positive or negative.

Signed-off-by: Kamoltat <ksirivad@redhat.com>
(cherry picked from commit 4504749)
Changes some the tests in teuthology to make
the test more deterministic.
Using:

`ceph osd set norecover` and
`ceph osd set nobackfill` when marking osds in
or out. As this will delay the recovery and make
sure it the test cases get the chance to check
that there is actually events poping up in
the progress module.

took out test_osd_cannot_recover from
tasks/mgr/test_progress.py since it is no longer
a relevant test case since recovery will get
triggered regardless if pg is unmoved.

Ignoring `OSDMAP_FLAGS` in teuthology
because we are using norecover and nobackfill
to delay the recovery process, therefore, it
will create a health warning and fails the
teuthology test.

Signed-off-by: Kamoltat <ksirivad@redhat.com>
(cherry picked from commit 5f33f2f)
Instead of fetching `pg_stats` from the python
part of manager module, we filter out the pgs
that are in active + clean state in ActivePyModules.cc
then parse these pgs along with `reported_epoch` and
the `total_num_pgs` of the clusters to global recovery
module.

Signed-off-by: Kamoltat <ksirivad@redhat.com>
(cherry picked from commit fa92db1)
@kamoltat kamoltat force-pushed the wip-ksirivad-backport-pacific-37544 branch from ddc3ad9 to f8f4c40 Compare September 30, 2021 13:33
@neha-ojha
Copy link
Member

@kamoltat I have created https://tracker.ceph.com/issues/52794 to track the backport for pacific.

@kamoltat
Copy link
Member Author

kamoltat commented Oct 1, 2021

https://tracker.ceph.com/issues/52794

thank you!

@kamoltat
Copy link
Member Author

@neha-ojha
Copy link
Member

https://pulpito.ceph.com/ksirivad-2021-10-15_19:44:24-rados:mgr-wip-ksirivad-backport-pacific-37544-distro-basic-smithi/

Tested 18/18 Pass

@kamoltat looks like @yuriw is also testing this PR, let's wait for him to finish his regular validation before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants