From c2e75a5aadc682fd0f75c0b0ee061d5f3a9ed77b Mon Sep 17 00:00:00 2001 From: Chuck Thier Date: Tue, 13 Jul 2010 22:24:47 -0500 Subject: [PATCH] Updated Swift All in One --- doc/source/development_saio.rst | 38 ++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/doc/source/development_saio.rst b/doc/source/development_saio.rst index 38c753e635..989813fb38 100644 --- a/doc/source/development_saio.rst +++ b/doc/source/development_saio.rst @@ -20,7 +20,7 @@ good idea what to do on other environments. from above. #. Select `Linux` and `Ubuntu 64-bit`. #. Fill in the *Linux Easy Install* details (you should make the user - name match your bzr repo user name). + name match your launchpad user id). #. `Customize Settings`, name the image whatever you want (`SAIO` for instance.) #. When the `Settings` window comes up, select `Hard Disk`, create an @@ -45,6 +45,7 @@ good idea what to do on other environments. #. `mount /mnt/sdb1` #. `mkdir /mnt/sdb1/1 /mnt/sdb1/2 /mnt/sdb1/3 /mnt/sdb1/4 /mnt/sdb1/test` #. `chown : /mnt/sdb1/*` + #. `mkdir /srv` #. `for x in {1..4}; do ln -s /mnt/sdb1/$x /srv/$x; done` #. `mkdir -p /etc/swift/object-server /etc/swift/container-server /etc/swift/account-server /srv/1/node/sdb1 /srv/2/node/sdb2 /srv/3/node/sdb3 /srv/4/node/sdb4 /var/run/swift` #. `chown -R : /etc/swift /srv/[1-4] /var/run/swift` @@ -148,13 +149,14 @@ good idea what to do on other environments. [DEFAULT] email = Your Name - + #. If you are using launchpad to get the code or make changes, run + `bzr launchpad-login ` #. Check out your bzr repo of swift, for example: - `bzr branch lp:swift` - #. ``for f in `ls ~/openswift/bin/`; do sudo ln -s /home//openswift/bin/$f /usr/bin/`basename $f .py`; done`` + `bzr branch lp:~swift-core/swift/trunk swift` + #. ``for f in `ls ~/swift/bin/`; do sudo ln -s /home//swift/bin/$f /usr/bin/`basename $f .py`; done`` #. Edit `~/.bashrc` and add to the end:: - export PYTHONPATH=~/openswift + export PYTHONPATH=~/swift export PATH_TO_TEST_XFS=/mnt/sdb1/test export SWIFT_TEST_CONFIG_FILE=/etc/swift/func_test.conf export PATH=${PATH}:~/bin @@ -422,11 +424,11 @@ good idea what to do on other environments. #. `chmod +x ~/bin/*` #. `remakerings` - #. `cd ~/openswift; ./.unittests` + #. `cd ~/swift; ./.unittests` #. `startmain` #. `swift-auth-create-account test tester testing` - #. Get an `X-Storage-Url` and `X-Auth-Token`: `curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' http://127.0.0.1:11000/v1.0` - #. Check that you can GET account: `curl -v -H 'X-Auth-Token: ' ` + #. Get an `X-Storage-Url` and `X-Auth-Token`: ``curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' http://127.0.0.1:11000/v1.0`` + #. Check that you can GET account: ``curl -v -H 'X-Auth-Token: ' `` #. Check that `st` works: `st -A http://127.0.0.1:11000/v1.0 -U test:tester -K testing stat` #. Create `/etc/swift/func_test.conf`:: @@ -440,6 +442,22 @@ good idea what to do on other environments. collate = C - #. `cd ~/openswift; ./.functests` - #. `cd ~/openswift; ./.probetests` + #. `cd ~/swift; ./.functests` + #. `cd ~/swift; ./.probetests` +---------------- +Debugging Issues +---------------- + +If all doesn't go as planned, and tests fail, or you can't auth, or something doesn't work, here are some good starting places to look for issues: + +#. Everything is logged in /var/log/syslog, so that is a good first place to + look for errors (most likely python tracebacks). +#. Make sure all of the server processes are running. For the base + functionality, the Proxy, Account, Container, Object and Auth servers + should be running +#. If one of the servers are not running, and no errors are logged to syslog, + it may be useful to try to start the server manually, for example: + `swift-object server /etc/swift/object-server/1.conf` will start the + object server. If there are problems not showing up in syslog, + then you will likely see the traceback on startup.