]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: osd-pool-create shows logs on error
authorLoic Dachary <loic@dachary.org>
Sun, 2 Feb 2014 09:31:48 +0000 (10:31 +0100)
committerLoic Dachary <loic@dachary.org>
Tue, 4 Feb 2014 07:16:23 +0000 (08:16 +0100)
extracting the logs would otherwise require a modification of the test
file to not clobber the directory containing the logs when it exits

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
src/test/mon/osd-pool-create.sh

index 2e0fa6f68d2615bdd9fb4cb3c0736b7a99495bf3..cabe6b083040267f5207b69720c87549b7a194af 100755 (executable)
@@ -19,7 +19,7 @@ PS4='$LINENO: '
 
 DIR=osd-pool-create
 rm -fr $DIR
-trap "set +x ; kill_mon || true ; rm -fr $DIR" EXIT
+trap "test \$? = 0 || cat $DIR/log ; set +x ; kill_mon || true && rm -fr $DIR" EXIT
 mkdir $DIR
 export CEPH_ARGS="--conf /dev/null --auth-supported=none --mon-host=127.0.0.1"