From: Sage Weil Date: Thu, 25 Jun 2009 17:22:33 +0000 (-0700) Subject: initscripts: allow 'user' option, defaults to current user X-Git-Tag: v0.10~143 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=35ac86ee2797259811842f25dcec81e44fe96d8c;p=ceph.git initscripts: allow 'user' option, defaults to current user --- diff --git a/src/ceph_common.sh b/src/ceph_common.sh index d3ff3f9decf4..5fee67d2efbb 100644 --- a/src/ceph_common.sh +++ b/src/ceph_common.sh @@ -29,8 +29,13 @@ check_host() { fi # we'll need to ssh into that host - ssh="ssh root@$host" - get_conf dir "$dir" "ssh path" $sections + get_conf sshuser "" "user" + if [ -z "$sshuser" ]; then + ssh="ssh $host" + else + ssh="ssh $sshuser@$host" + fi + get_conf dir "$dir" "ssh path" fi else host=$hostname @@ -47,7 +52,7 @@ do_cmd() { ulimit -c unlimited bash -c "$1" || { echo "failed: '$1'" ; exit 1; } else - [ $verbose -eq 1 ] && echo "--- $host# cd $dir ; ulimit -c unlimited ; $1" + [ $verbose -eq 1 ] && echo "--- $ssh $2 \"cd $dir ; ulimit -c unlimited ; $1\"" $ssh $2 "cd $dir ; ulimit -c unlimited ; $1" || { echo "failed: '$ssh $1'" ; exit 1; } fi } diff --git a/src/cosd.ceph.conf b/src/cosd.ceph.conf index a276dc7928bd..fc7246ae038d 100644 --- a/src/cosd.ceph.conf +++ b/src/cosd.ceph.conf @@ -26,7 +26,7 @@ ; --------------------- [mds] -; debug mds = 20 + debug mds = 20 debug ms = 1 ; debug journaler = 20 ; log dir = /data/ceph4 @@ -43,9 +43,10 @@ ; --------------------- [osd] + user = root debug ms = 1 debug osd = 20 -; debug filestore = 20 + debug filestore = 10 ; debug journal = 20 log dir = /data/cosd$id osd data = /mnt/osd$id