Skip to content

qa/tasks/mgr: bounce the mgrs once per test class - #70097

Merged
afreen23 merged 1 commit into
ceph:mainfrom
tchaikov:wip-mgr-testcase-single-bounce
Jul 29, 2026
Merged

afreen23 merged 1 commit into
ceph:mainfrom
tchaikov:wip-mgr-testcase-single-bounce

Conversation

@tchaikov

@tchaikov tchaikov commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

The dashboard backend API suite occasionally fails in CI on the job's 7200 second timeout alone, with every test passing. Suite runtime varies with builder load: identical runs of the same 311 tests took anywhere from about 5400 to over 7000 seconds, and teardown needs roughly another 180 seconds on top. On the runs that landed at the high end, only 60 to 80 seconds of margin were left before the timeout fired. Cutting setup overhead gives the suite that margin back.

DashboardTestCase.setUpClass() restarted every mgr twice: once in MgrTestCase.setup_mgrs(), and again right after in _assign_ports(), whose only job is to set the per-mgr dashboard port, which has to happen while the mgrs are down.

Let subclasses declare their module ports in a MODULE_PORTS class attribute instead. setup_mgrs() assigns them while the daemons are already stopped, so the single restart it performs picks them up and the second stop/fail/restart cycle disappears.

The assignment loop moves to _assign_module_ports(). _assign_ports() keeps its old stop/assign/restart contract for callers that reassign ports outside class setup (test_prometheus, test_dashboard, test_module_selftest) and delegates to the shared helper.

With 66 dashboard test classes per API suite run this removes one full mgr bounce per class, roughly 10 to 15 minutes of wall clock in the CI runs examined.

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

The dashboard backend API suite occasionally fails in CI on the job's
7200 second timeout alone, with every test passing. Suite runtime
varies with builder load: identical runs of the same 311 tests took
anywhere from about 5400 to over 7000 seconds, and teardown needs
roughly another 180 seconds on top. On the runs that landed at the
high end, only 60 to 80 seconds of margin were left before the
timeout fired. Cutting setup overhead gives the suite that margin
back.

DashboardTestCase.setUpClass() restarted every mgr twice: once in
MgrTestCase.setup_mgrs(), and again right after in _assign_ports(),
whose only job is to set the per-mgr dashboard port, which has to
happen while the mgrs are down.

Let subclasses declare their module ports in a MODULE_PORTS class
attribute instead. setup_mgrs() assigns them while the daemons are
already stopped, so the single restart it performs picks them up and
the second stop/fail/restart cycle disappears.

The assignment loop moves to _assign_module_ports(). _assign_ports()
keeps its old stop/assign/restart contract for callers that reassign
ports outside class setup (test_prometheus, test_dashboard,
test_module_selftest) and delegates to the shared helper.

With 66 dashboard test classes per API suite run this removes one
full mgr bounce per class, roughly 10 to 15 minutes of wall clock in
the CI runs examined.

Signed-off-by: Kefu Chai <[email protected]>
@tchaikov
tchaikov force-pushed the wip-mgr-testcase-single-bounce branch from 84d2d80 to 4af7837 Compare July 10, 2026 07:13
@github-project-automation github-project-automation Bot moved this from New to Reviewer approved in Ceph-Dashboard Jul 27, 2026
@afreen23
afreen23 merged commit 25187a4 into ceph:main Jul 29, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in Ceph-Dashboard Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants