]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: rbd/concurrent.sh: suppress rbd map output
authorIlya Dryomov <idryomov@gmail.com>
Fri, 13 May 2016 13:05:53 +0000 (15:05 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 13 May 2016 15:51:45 +0000 (17:51 +0200)
rbd_map_image() echoes the id of the image and is used in command
substitution:

    id=$(rbd_map_image "${image}")

Output from rbd map isn't consumed and clobbers the return.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
qa/workunits/rbd/concurrent.sh

index f3373b5fff2425fdd380c2efd4508be4bea45697..e2fb7974724ba7e0371167e74ea8127549fad470 100755 (executable)
@@ -257,7 +257,8 @@ function rbd_map_image() {
        local image="$1"
        local id
 
-       sudo rbd map "${image}" --user "${CEPH_ID}" ${SECRET_ARGS}
+       sudo rbd map "${image}" --user "${CEPH_ID}" ${SECRET_ARGS} \
+               > /dev/null 2>&1
 
        id=$(rbd_image_id "${image}")
        echo "${id}"
@@ -317,7 +318,7 @@ function rbd_unmap_image() {
        [ $# -eq 1 ] || exit 99
        local id="$1"
 
-       sudo rbd unmap "/dev/rbd${id}" > /dev/null 2>&1
+       sudo rbd unmap "/dev/rbd${id}"
 }
 
 function rbd_destroy_image() {