Skip to content

qa: get_rand_pg_acting_set needs to wait for pool to create PGs - #64016

Merged
SrinivasaBharath merged 1 commit into
ceph:mainfrom
bill-scales:issue70818
Jul 17, 2025
Merged

SrinivasaBharath merged 1 commit into
ceph:mainfrom
bill-scales:issue70818

Conversation

@bill-scales

@bill-scales bill-scales commented Jun 18, 2025 •

Copy link
Copy Markdown
Contributor

There is a race hazard in the OSD thrasher which tests if a pool exists and then queries the PGs in the pool. It is possible that a pool exists (has been added to OSDMap) but the PGs have not been created yet (by the OSDs). Add a sleep/retry to mitigate the race.

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

I've not been able to reproduce the race hazard but I have run the test which failed previously to validate that the change to the qa test has not regressed the thrasher - https://pulpito.ceph.com/billscales-2025-06-18_15:46:37-rados:thrash-erasure-code-overwrites:-main-distro-default-smithi/

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

There is a race hazard in the OSD thrasher which tests if a pool
exists and then queries the PGs in the pool. It is possible that
a pool exists (has been added to OSDMap) but the PGs have not
been created yet (by the OSDs). Add a sleep/retry to mitigate
the race.

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

Signed-off-by: Bill Scales <[email protected]>
@github-actions github-actions Bot added the tests label Jun 18, 2025
@bill-scales
bill-scales requested a review from kamoltat June 23, 2025 09:51
@ljflores ljflores added the core label Jun 23, 2025

@kamoltat kamoltat 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.

Thanks for making the change @bill-scales , 15 seconds seem like a good duration.

Another alternative would be to use the safe_while in
the caller function. e.g., OSDThrasher::test_pool_min_size, which is messier and more redundantly, unfortunately this format can be found on my many places in tests like OSDThrasher. Hopefully, this change will set a good example.

@Naveenaidu

Copy link
Copy Markdown
Contributor

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.

6 participants