Skip to content

qa/standalone/osd: fix recovery_toofull race in osd-recovery-space.sh - #71393

Merged
ronen-fr merged 1 commit into
ceph:mainfrom
ronen-fr:wip-rf-recovery-space
Sep 9, 2026
Merged

ronen-fr merged 1 commit into
ceph:mainfrom
ronen-fr:wip-rf-recovery-space

Conversation

@ronen-fr

Copy link
Copy Markdown
Contributor

TEST_recovery_test_simple relies on the recovery target OSD crossing its full-ratio while recovery is still in progress. But fake_statfs only reports the OSD as full once the recovered data has landed, so on fast hardware the small (~3MB) recovery completes (PG active+clean) before the OSD's periodic full-status check ever fires, and recovery_toofull never triggers.

Throttle recovery (osd_recovery_sleep) so the full-status check reliably fires before recovery finishes.

Also fix wait_for_recovery_toofull(): it tested an unset $ret instead of the return code of wait_for_state, so the timeout was silently swallowed and the helper always returned success.

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

TEST_recovery_test_simple relies on the recovery target OSD crossing
its full-ratio while recovery is still in progress. But fake_statfs
only reports the OSD as full once the recovered data has landed, so on
fast hardware the small (~3MB) recovery completes (PG active+clean)
before the OSD's periodic full-status check ever fires, and
recovery_toofull never triggers.

Throttle recovery (osd_recovery_sleep) so the full-status check
reliably fires before recovery finishes.

Also fix wait_for_recovery_toofull(): it tested an unset $ret instead
of the return code of wait_for_state, so the timeout was silently
swallowed and the helper always returned success.

Fixes: https://tracker.ceph.com/issues/80024
Signed-off-by: Ronen Friedman <[email protected]>
@ronen-fr
ronen-fr requested a review from a team as a code owner August 27, 2026 16:26
# and recovery_toofull never triggers.
for o in $(seq 0 $(expr $OSDS - 1))
do
ceph tell osd.$o injectargs '--osd_recovery_sleep 0.05' || return 1

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.

The sleep driven synchronization seems more than enough for a test.

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath10-testing-20260903.050751-main.

@amathuria

Copy link
Copy Markdown
Contributor

@ronen-fr
ronen-fr merged commit 76957ba into ceph:main Sep 9, 2026
7 of 8 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.

4 participants