From: Josh Durgin Date: Wed, 14 Jan 2015 23:01:38 +0000 (-0800) Subject: qa: ignore duplicates in rados ls X-Git-Tag: v0.93~279^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e7cc6117adf653a4915fb7a75fac68f8fa0239ec;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 --- diff --git a/qa/workunits/rbd/import_export.sh b/qa/workunits/rbd/import_export.sh index d1ba29a4f1ec..d3d164ddfbd0 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 }