ceph/0002-init-ceph.in-Allow-cus...

38 lines
1.4 KiB
Diff

From 726127dbd6d51c97495e73c3216c27dd38a31ed3 Mon Sep 17 00:00:00 2001
From: Anthony Alba <ascanio.alba7@gmail.com>
Date: Mon, 30 Nov 2015 16:44:31 +0800
Subject: [PATCH] init-ceph.in: Allow custom cluster names during startup.
Signed-off-by: Richard Chan <richard@treeboxsolutions.com>
---
src/init-ceph.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/init-ceph.in b/src/init-ceph.in
index e4cea7e..1f19ffa 100644
--- a/src/init-ceph.in
+++ b/src/init-ceph.in
@@ -288,7 +288,7 @@ for name in $what; do
lockfile=""
fi
- get_conf asok "$run_dir/ceph-$type.$id.asok" "admin socket"
+ get_conf asok "$run_dir/$cluster-$type.$id.asok" "admin socket"
case "$command" in
start)
@@ -404,8 +404,8 @@ for name in $what; do
# these keys. it's also true for legacy installs
# via mkcephfs, which is fine too; there is no harm
# in creating these keys.
- get_conf mon_data "/var/lib/ceph/mon/ceph-$id" "mon data"
- if [ "$mon_data" = "/var/lib/ceph/mon/ceph-$id" -a "$asok" = "/var/run/ceph/ceph-mon.$id.asok" ]; then
+ get_conf mon_data "/var/lib/ceph/mon/$cluster-$id" "mon data"
+ if [ "$mon_data" = "/var/lib/ceph/mon/$cluster-$id" -a "$asok" = "/var/run/ceph/$cluster-mon.$id.asok" ]; then
echo Starting ceph-create-keys on $host...
cmd2="$SBINDIR/ceph-create-keys --cluster $cluster -i $id 2> /dev/null &"
do_cmd "$cmd2"
--
2.5.5