summaryrefslogtreecommitdiff
path: root/src/mkcephfs.in
diff options
context:
space:
mode:
authorDanny Kukawka <danny.kukawka@bisect.de>2012-08-16 12:56:58 +0200
committerSage Weil <sage@inktank.com>2012-08-16 10:57:43 -0700
commita14214dc9b7c15581a0664dbe259389867f88e72 (patch)
tree92d03c8218138b0cb721ce0d56fef226a571b377 /src/mkcephfs.in
parentd1a31ce1ca2a5e1c53146c6e9063a123a1fe8cdb (diff)
downloadceph-a14214dc9b7c15581a0664dbe259389867f88e72.tar.gz
fix keyring generation for mds and osd
[ 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>
Diffstat (limited to 'src/mkcephfs.in')
-rw-r--r--src/mkcephfs.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mkcephfs.in b/src/mkcephfs.in
index 87c44279b2d..76a4fe9e04a 100644
--- a/src/mkcephfs.in
+++ b/src/mkcephfs.in
@@ -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