Project

General

Profile

Actions

Bug #18471

closed

wait_for_clean() races with pg creation

Added by David Zafman over 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
David Zafman
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

If wait_for_clean() is called too quickly after a pool is created, It can get a low count of pgs. This will cause it to never break out of the loop and eventually timeout.

This check will have a cur_active_clean > num_pgs because num_pgs doesn't include the newly created ones.

test $cur_active_clean = $num_pgs && break

A quick fix would be to call get_num_pgs instead of relying on the one stashed at the start. The only issue is that the race is still present and maybe we could return from wait_for_clean without the newly created pgs even existing.

Actions #1

Updated by David Zafman about 7 years ago

  • Status changed from 12 to Resolved

Sha1 1009a16291fca88b02c164d2003593e3fe6981c9

Actions

Also available in: Atom PDF