Skip to content

qa: make test_progress atomically capture OSD marked in/out events - #67659

Merged
kamoltat merged 2 commits into
ceph:mainfrom
kamoltat:wip-ksirivad-fix-70320
Mar 11, 2026
Merged

kamoltat merged 2 commits into
ceph:mainfrom
kamoltat:wip-ksirivad-fix-70320

Conversation

@kamoltat

@kamoltat kamoltat commented Mar 4, 2026 •

Copy link
Copy Markdown
Member

Problem:
Test had a race condition where events could complete and disappear between checking the event count and fetching the event, causing test failures.

Slow ops problem:
The reason we had a slow-requests is because during the test, 16 concurrent 4 MB writes were running while recovery and backfill were disabled. At the same time, osd.0 was marked out and then back in, causing PG remapping. Because recovery/backfill was disabled, some PGs could not restore their replicas after the remap, leaving them in degraded/remapped states. As a result, a batch of writes remained stuck in the replicated write path, leading to IO stall and slow ops being reported. Solution is to ignore this as we are testing the progress module, not the write paths of OSDs. We intentionally disable backfill and recovery in order to prevent the recovery event to finish quickly. We wanted to prolong it until the progress event pops up.

Solution:
Refactor to atomically capture events during the wait condition check. Added helper methods _wait_for_osd_marked_out_event() and _wait_for_osd_marked_in_event() that capture events at the moment they're detected, eliminating the race window.

white-list slow-requests

Fixes: https://tracker.ceph.com/issues/70320

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.

Problem:
Test had a race condition where events could complete and disappear
between checking the event count and fetching the event, causing
test failures.

Solution:
Refactor to atomically capture events during the wait condition check.
Added helper methods _wait_for_osd_marked_out_event() and
_wait_for_osd_marked_in_event() that capture events at the moment
they're detected, eliminating the race window.

Fixes: https://tracker.ceph.com/issues/70320

Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>
@kamoltat kamoltat self-assigned this Mar 4, 2026
@github-actions github-actions Bot added the tests label Mar 4, 2026
@kamoltat

kamoltat commented Mar 5, 2026

Copy link
Copy Markdown
Member Author

Because of the non-deterministic nature of the bug, currently, I am trying to verify the fix by scheduling 2 runs.

Run 1: without the fix (40 jobs) -> goal to get some reds: https://pulpito.ceph.com/ksirivad-2026-03-05_16:11:56-rados:mgr-main-distro-default-trial/

Run 2: with the fix (40 jobs) -> goal to get all green: https://pulpito.ceph.com/ksirivad-2026-03-05_16:15:02-rados:mgr-main-distro-default-trial/

@kamoltat
kamoltat marked this pull request as ready for review March 5, 2026 16:32
@kamoltat
kamoltat requested a review from a team March 5, 2026 16:32
@kamoltat

kamoltat commented Mar 6, 2026

Copy link
Copy Markdown
Member Author

I can confirm that with the fix we have got rid of the issue: https://pulpito.ceph.com/ksirivad-2026-03-05_16:15:02-rados:mgr-main-distro-default-trial/

However, we might need to whitelist:

cluster [WRN] 4 slow requests (by type [ 'delayed' : 4 ] most affected pool [ 'progress_data' : 4 ])

as that is the only unrelated failure that we unblocked for https://pulpito.ceph.com/ksirivad-2026-03-05_16:15:02-rados:mgr-main-distro-default-trial/89808/

@github-actions github-actions Bot added the core label Mar 6, 2026
@kamoltat

kamoltat commented Mar 6, 2026

Copy link
Copy Markdown
Member Author

The reason we had a slow-requests is because during the test, 16 concurrent 4 MB writes were running while recovery and backfill were disabled. At the same time, osd.0 was marked out and then back in, causing PG remapping. Because recovery/backfill was disabled, some PGs could not restore their replicas after the remap, leaving them in degraded/remapped states. As a result, a batch of writes remained stuck in the replicated write path, leading to IO stall and slow ops being reported. Solution is to ignore this as we are testing the progress module, not the write paths of OSDs. We intentionally disable backfill and recovery in order to prevent the recovery event to finish quickly. We wanted to prolong it until the progress event pops up.

The reason we had a slow-requests is because during the test, 16 concurrent 4 MB writes were running while recovery and backfill were disabled. At the same time, osd.0 was marked out and then back in, causing PG remapping. Because recovery/backfill was disabled, some PGs could not restore their replicas after the remap, leaving them in degraded/remapped states. As a result, a batch of writes remained stuck in the replicated write path, leading to IO stall and slow ops being reported. Solution is to ignore this as we are testing the progress module, not the write paths of OSDs. We intentionally disable backfill and recovery in order to prevent the recovery event to finish quickly. We wanted to prolong it until the progress event pops up.

Fixes: https://tracker.ceph.com/issues/70320

Signed-off-by: Kamoltat (Junior) Sirivadhna <[email protected]>
@kamoltat
kamoltat force-pushed the wip-ksirivad-fix-70320 branch from 3f8b21d to 6b0c943 Compare March 6, 2026 17:58
@kamoltat kamoltat added the needs-squid-backport PR needs a squid backport label Mar 6, 2026

@shraddhaag shraddhaag left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good. Thanks for the detailed explanation Junior.

Just to be sure, do we have an updated QA run where we see all jobs green?

@kamoltat

Copy link
Copy Markdown
Member Author

This looks good. Thanks for the detailed explanation Junior.

Just to be sure, do we have an updated QA run where we see all jobs green?

@shraddhaag you're correct to ask, I am scheduling another run right now. Thanks for the review!
https://pulpito.ceph.com/ksirivad-2026-03-11_14:17:48-rados:mgr-main-distro-default-trial/

@kamoltat

Copy link
Copy Markdown
Member Author

Yep looks like it's all green!

@kamoltat

kamoltat commented Mar 11, 2026 •

Copy link
Copy Markdown
Member Author

This doesn't need to go through the extensive 250 jobs + rados suite test in teuthology since it only change a rados:mgr suite that is specific to the prorgress module. We have verified that the changes are all green in our 40 jobs run of the same test with different distro and etc. There were no actual src changes.

@kamoltat
kamoltat merged commit 90a21b5 into ceph:main Mar 11, 2026
7 checks passed
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.

2 participants