]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mkcephfs: pick rdir based on whether current daemon is local or not
authorSage Weil <sage.weil@dreamhost.com>
Thu, 19 May 2011 16:29:11 +0000 (09:29 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Thu, 19 May 2011 16:29:11 +0000 (09:29 -0700)
We need to pick $rdir as local or remote inside the for name loop.

Fixes: #1094
Signed-off-by: Sage Weil <sage@newdream.net>
src/mkcephfs.in

index e87709c6690c6100d6da295bda5dbe10b2e41fd8..8558754e58c4b56422797c71aa7e1952b96581a5 100644 (file)
@@ -391,14 +391,6 @@ if [ $allhosts -eq 1 ]; then
        trap "rm -rf $dir ; exit" INT TERM EXIT
     fi
 
-    # temp dir on remote nodes
-    if [ -n "$ssh" ]; then
-       rdir="/tmp/mkfs.ceph.$$"
-       echo "remote temp dir is $rdir"
-    else
-       rdir=$dir
-    fi
-
     $0 --prepare-monmap -d $dir -c $conf
 
     # osd, mds
@@ -412,10 +404,13 @@ if [ $allhosts -eq 1 ]; then
        check_host || continue
 
        if [ -n "$ssh" ]; then
-           echo pushing conf and monmap to $host
+           rdir="/tmp/mkfs.ceph.$$"
+           echo pushing conf and monmap to $host:$rdir
            do_cmd "mkdir -p $rdir"
            scp -q $dir/conf $host:$rdir
            scp -q $dir/monmap $host:$rdir
+       else
+           rdir=$dir
        fi
        
        if [ $mkbtrfs -eq 1 ] && [ "$type" = "osd" ]; then