From: Josh Durgin Date: Wed, 14 Jan 2015 23:01:38 +0000 (-0800) Subject: qa: ignore duplicates in rados ls X-Git-Tag: v0.80.9~21 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d7ccf71d962cec1571f53c9392f9b58350569062;p=ceph.git qa: ignore duplicates in rados ls These can happen with split or with state changes due to reordering results within the hash range requested. It's easy enough to filter them out at this stage. Backport: giant, firefly Signed-off-by: Josh Durgin (cherry picked from commit e7cc6117adf653a4915fb7a75fac68f8fa0239ec) --- diff --git a/qa/workunits/rbd/import_export.sh b/qa/workunits/rbd/import_export.sh index d1ba29a4f1ece..d3d164ddfbd05 100755 --- a/qa/workunits/rbd/import_export.sh +++ b/qa/workunits/rbd/import_export.sh @@ -9,7 +9,7 @@ objects () { # it doesn't necessarily make sense as they're hex, at least it makes # the list repeatable and comparable objects=$(rados ls -p rbd | grep $prefix | \ - sed -e 's/'$prefix'\.//' -e 's/^0*\([0-9a-f]\)/\1/' | sort) + sed -e 's/'$prefix'\.//' -e 's/^0*\([0-9a-f]\)/\1/' | sort -u) echo $objects }