ssh=""
rootssh=""
dir=$PWD
+ get_conf user "" "user"
if [ -n "$host" ]; then
#echo host for $name is $host, i am $hostname
if [ "$host" != "$hostname" ]; then
fi
# we'll need to ssh into that host
- get_conf sshuser "" "user"
- if [ -z "$sshuser" ]; then
+ if [ -z "$user" ]; then
ssh="ssh $host"
else
- ssh="ssh $sshuser@$host"
+ ssh="ssh $user@$host"
fi
rootssh="ssh root@$host"
get_conf dir "$dir" "ssh path"
if [ -z "$ssh" ]; then
[ $verbose -eq 1 ] && echo "--- $host# $1"
ulimit -c unlimited
- bash -c "$1" || { echo "failed: '$1'" ; exit 1; }
+ whoami=`whoami`
+ if [ "$whoami" = "$user" ] || [ -z "$user" ]; then
+ bash -c "$1" || { echo "failed: '$1'" ; exit 1; }
+ else
+ su $user -c "$1" || { echo "failed: '$1'" ; exit 1; }
+ fi
else
[ $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; }
if [ -z "$ssh" ]; then
[ $verbose -eq 1 ] && echo "--- $host# $1"
ulimit -c unlimited
- sudo bash -c "$1" || { echo "failed: '$1'" ; exit 1; }
+ whoami=`whoami`
+ if [ "$whoami" = "root" ] || [ -z "$user" ]; then
+ bash -c "$1" || { echo "failed: '$1'" ; exit 1; }
+ else
+ sudo bash -c "$1" || { echo "failed: '$1'" ; exit 1; }
+ fi
else
[ $verbose -eq 1 ] && echo "--- $ssh $2 \"cd $dir ; ulimit -c unlimited ; $1\""
$rootssh $2 "cd $dir ; ulimit -c unlimited ; $1" || { echo "failed: '$ssh $1'" ; exit 1; }
[group cephnet]
addr = 10.3.14.0/24
+[group backup]
+ addr = 10.104.0.219
+
[mount /]
- allow = %cephnet
+ allow = "%cephnet %backup"
; ---------------------
[global]
log sym dir = /home/sage/ceph/src/out
chdir = /home/sage/ceph/src
restart on core dump = false
+ user = sage
; ---------------------
[mon]
debug ms = 1
debug osd = 20
debug filestore = 10
-; debug journal = 20
+ debug journal = 20
log dir = /data/cosd$id
osd data = /mnt/osd$id
btrfs options = "user_xattr,flushoncommit,usertrans"