Skip to content

Commit

Permalink
vstart tweaks -- only for tags/v0.94.2 (FK branch) (ceph#16)
Browse files Browse the repository at this point in the history
-- Some of these have been fixed in master
* pass CEPH_DIR env var around where missing
* allow cmds to discover ceph conf & key from env
* skip user create when using previous vstart setup
  • Loading branch information
rollandsantimano committed Sep 21, 2016
1 parent 47d7380 commit fbe58a0
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/vstart.sh
Expand Up @@ -283,7 +283,7 @@ fi
test -d $CEPH_DEV_DIR/osd0/. && test -e $CEPH_DEV_DIR/sudo && SUDO="sudo"

if [ "$start_all" -eq 1 ]; then
$SUDO $INIT_CEPH stop
$SUDO $INIT_CEPH $ARGS stop
fi
$SUDO rm -f core*

Expand Down Expand Up @@ -644,7 +644,15 @@ do_rgw()
if [ "$debug" -ne 0 ]; then
RGWDEBUG="--debug-rgw=20"
fi
$CEPH_BIN/radosgw --log-file=${CEPH_OUT_DIR}/rgw.log ${RGWDEBUG} --debug-ms=1
if [ "$CEPH_DIR" != "$PWD" ]; then
export CEPH_CONF=$conf_fn
export CEPH_KEYRING=$keyring_fn
fi
$CEPH_BIN/radosgw --log-file=${CEPH_OUT_DIR}/rgw.log ${RGWDEBUG} --debug-ms=1 $ARGS

if [ "$new" -eq 0 ]; then
return
fi

# Create S3 user
local akey='0555b35654ad1656d804'
Expand All @@ -670,7 +678,7 @@ do_rgw()

# Create Swift user
echo "setting up user tester"
$CEPH_BIN/radosgw-admin user create --subuser=tester:testing --display-name=Tester-Subuser --key-type=swift --secret=asdf > /dev/null
$CEPH_BIN/radosgw-admin user create --subuser=tester:testing --display-name=Tester-Subuser --key-type=swift --secret=asdf $ARGS > /dev/null
}
if [ "$start_rgw" -eq 1 ]; then
do_rgw
Expand All @@ -679,8 +687,10 @@ fi
echo "started. stop.sh to stop. see out/* (e.g. 'tail -f out/????') for debug output."

echo ""
echo "export PATH=$PATH:$PWD"
echo "export PYTHONPATH=./pybind"
echo "export LD_LIBRARY_PATH=$CEPH_LIB"
echo "export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH"

if [ "$CEPH_DIR" != "$PWD" ]; then
echo "export CEPH_CONF=$conf_fn"
Expand Down

0 comments on commit fbe58a0

Please sign in to comment.