Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: osd-crush.sh must retry crush dump #12016

Merged
merged 1 commit into from Nov 16, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 13 additions & 2 deletions src/test/mon/osd-crush.sh
Expand Up @@ -271,8 +271,19 @@ function TEST_crush_repair_faulty_crushmap() {
ceph osd setcrushmap -i $empty_map.map || return 1

# should be an empty crush map without any buckets
! test $(ceph osd crush dump --format=xml | \
$XMLSTARLET sel -t -m "//buckets/bucket" -v .) || return 1
success=false
for delay in 1 2 4 8 16 32 64 128 256 ; do
if ! test $(ceph osd crush dump --format=xml | \
$XMLSTARLET sel -t -m "//buckets/bucket" -v .) ; then
success=true
break
fi
sleep $delay
done
if ! $success ; then
ceph osd crush dump --format=xml
return 1
fi
# bring them down, the "ceph" commands will try to hunt for other monitor in
# vain, after mon.a is offline
kill_daemons $dir || return 1
Expand Down