]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
fix keyring generation for mds and osd
authorDanny Kukawka <danny.kukawka@bisect.de>
Thu, 16 Aug 2012 10:56:58 +0000 (12:56 +0200)
committerSage Weil <sage@inktank.com>
Thu, 16 Aug 2012 16:26:00 +0000 (09:26 -0700)
    [ The following text is in the "UTF-8" character set. ]
    [ Your display is set for the "ANSI_X3.4-1968" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Fix config keys for OSD/MDS data dirs. As in documentation and other
places of the scripts the keys are 'osd data'/'mds data' and not
'osd_data'

In case if MDS: if 'mds data' doesn't exist, create it.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
src/mkcephfs.in

index 45e48f76deebc53ca3ffb97ba1a80561fc525734..aae616c68a03a2b3bb5eb3ccc19240906cb71d65 100644 (file)
@@ -251,14 +251,15 @@ if [ -n "$initdaemon" ]; then
     if [ $type = "osd" ]; then
        $BINDIR/ceph-osd -c $conf --monmap $dir/monmap -i $id --mkfs --mkkey
 
-       get_conf osd_data "/var/lib/ceph/osd/ceph-$id" "osd_data"
+       get_conf osd_data "/var/lib/ceph/osd/ceph-$id" "osd data"
        get_conf osd_keyring "$osd_data/keyring" "keyring"
        $BINDIR/ceph-authtool -p -n $name $osd_keyring > $dir/key.$name
     fi
     
     if [ $type = "mds" ]; then
-       get_conf mds_data "/var/lib/ceph/mds/ceph-$id" "mds_data"
+       get_conf mds_data "/var/lib/ceph/mds/ceph-$id" "mds data"
        get_conf mds_keyring "$mds_data/keyring" "keyring"
+       test -d $mds_data || mkdir -p $mds_data
        echo "creating private key for $name keyring $mds_keyring"
        $BINDIR/ceph-authtool --create-keyring --gen-key -n $name $mds_keyring
        $BINDIR/ceph-authtool -p -n $name $mds_keyring > $dir/key.$name