]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/mon/mkfs.sh: add check for default keyring 2394/head
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 4 Sep 2014 10:25:05 +0000 (12:25 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 16 Sep 2014 10:00:08 +0000 (12:00 +0200)
The auth_cephx_key check always fails if there is a default
keyring in /etc/ceph/ available. Check if keyring exists and
fail with error message if keyring file in path.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/mon/mkfs.sh

index 5e96e8d68c6942ce372bdb1218a467fad65f730f..c86eaf4126a1c3667fb6ed49f1a34b85d4ec541c 100755 (executable)
@@ -112,6 +112,11 @@ EOF
 }
 
 function auth_cephx_key() {
+    if [ -f /etc/ceph/keyring ] ; then
+       echo "Please move /etc/ceph/keyring away for testing!"
+       return 1
+    fi  
+
     local key=$(./ceph-authtool --gen-print-key)
 
     if mon_mkfs --key='corrupted key' ; then