]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: ignore duplicates in rados ls
authorJosh Durgin <jdurgin@redhat.com>
Wed, 14 Jan 2015 23:01:38 +0000 (15:01 -0800)
committerJosh Durgin <jdurgin@redhat.com>
Fri, 16 Jan 2015 07:20:47 +0000 (23:20 -0800)
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 <jdurgin@redhat.com>
(cherry picked from commit e7cc6117adf653a4915fb7a75fac68f8fa0239ec)

qa/workunits/rbd/import_export.sh

index d1ba29a4f1ece4e8bcaf367072e1b313020f7a8a..d3d164ddfbd051c29749dd7adca835a22a8bf72a 100755 (executable)
@@ -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
 }