From 65bf3b08b572b9b25ad064fb784742e5d6456f06 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Wed, 14 Jan 2015 15:01:38 -0800 Subject: [PATCH] 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) --- qa/workunits/rbd/import_export.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } -- 2.39.5