From: Sage Weil Date: Thu, 25 Apr 2013 18:13:33 +0000 (-0700) Subject: init-ceph: use remote config when starting daemons on remote nodes (-a) X-Git-Tag: v0.62~57^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cd7e52cc76878eed0f084f7b9a6cf7c792b716c6;p=ceph.git init-ceph: use remote config when starting daemons on remote nodes (-a) If you use -a to start a remote daemon, assume the remote config is present instead of pushing the local config. This makes more sense and simplifies things. Note that this means that -a in concert with -c foo means that foo must also be present on the remote node in the same path. That, however, is a use case that I don't particularly care about right now. :) Signed-off-by: Sage Weil Reviewed-by: Dan Mick --- diff --git a/src/init-ceph.in b/src/init-ceph.in index 61c10e169720..3e0b0810dd54 100644 --- a/src/init-ceph.in +++ b/src/init-ceph.in @@ -213,15 +213,7 @@ for name in $what; do fi # conf file - if [ "$host" = "$hostname" ]; then - cur_conf=$conf - else - unique=`dd if=/dev/urandom bs=16 count=1 2>/dev/null | md5sum | awk '{print $1}'` - scp -q $conf $host:/tmp/ceph.conf.$unique - trap "ssh $host rm /tmp/ceph.conf.$unique" EXIT - cur_conf="/tmp/ceph.conf.$unique" - fi - cmd="$cmd -c $cur_conf" + cmd="$cmd -c $conf" if echo $name | grep -q ^osd; then get_conf osd_data "/var/lib/ceph/osd/ceph-$id" "osd data"