diff --git a/AUTHORS b/AUTHORS index bf834db788..f6287945c8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -27,6 +27,7 @@ Stephen Milton Russ Nelson Colin Nicholson Andrew Clay Shafer +Scott Simpson Monty Taylor Caleb Tennis FUJITA Tomonori diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000000..97fe05d552 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,4 @@ +swift (x.x.x) + + * Renamed swift-stats-populate to swift-dispersion-populate and + swift-stats-report to swift-dispersion-report. diff --git a/bin/swauth-add-account b/bin/swauth-add-account index 2b91b6292d..b8591c3425 100755 --- a/bin/swauth-add-account +++ b/bin/swauth-add-account @@ -65,4 +65,4 @@ if __name__ == '__main__': ssl=(parsed.scheme == 'https')) resp = conn.getresponse() if resp.status // 100 != 2: - print 'Account creation failed: %s %s' % (resp.status, resp.reason) + exit('Account creation failed: %s %s' % (resp.status, resp.reason)) diff --git a/bin/swauth-add-user b/bin/swauth-add-user index 23144df41b..7b3dc129d3 100755 --- a/bin/swauth-add-user +++ b/bin/swauth-add-user @@ -90,4 +90,4 @@ if __name__ == '__main__': ssl=(parsed.scheme == 'https')) resp = conn.getresponse() if resp.status // 100 != 2: - print 'User creation failed: %s %s' % (resp.status, resp.reason) + exit('User creation failed: %s %s' % (resp.status, resp.reason)) diff --git a/bin/swauth-cleanup-tokens b/bin/swauth-cleanup-tokens index 3ca86cd990..3b09072f40 100755 --- a/bin/swauth-cleanup-tokens +++ b/bin/swauth-cleanup-tokens @@ -25,7 +25,7 @@ from optparse import OptionParser from sys import argv, exit from time import sleep, time -from swift.common.client import Connection +from swift.common.client import Connection, ClientException if __name__ == '__main__': @@ -65,7 +65,15 @@ if __name__ == '__main__': while True: if options.verbose: print 'GET %s?marker=%s' % (container, marker) - objs = conn.get_container(container, marker=marker)[1] + try: + objs = conn.get_container(container, marker=marker)[1] + except ClientException, e: + if e.http_status == 404: + exit('Container %s not found. swauth-prep needs to be ' + 'rerun' % (container)) + else: + exit('Object listing on container %s failed with status ' + 'code %d' % (container, e.http_status)) if objs: marker = objs[-1]['name'] else: @@ -90,7 +98,13 @@ if __name__ == '__main__': (container, obj['name'], time() - detail['expires']) print 'DELETE %s/%s' % (container, obj['name']) - conn.delete_object(container, obj['name']) + try: + conn.delete_object(container, obj['name']) + except ClientException, e: + if e.http_status != 404: + print 'DELETE of %s/%s failed with status ' \ + 'code %d' % (container, obj['name'], + e.http_status) elif options.verbose: print "%s/%s won't expire for %ds; skipping" % \ (container, obj['name'], diff --git a/bin/swauth-delete-account b/bin/swauth-delete-account index 66bdf2bbe1..45aba4c502 100755 --- a/bin/swauth-delete-account +++ b/bin/swauth-delete-account @@ -57,4 +57,4 @@ if __name__ == '__main__': ssl=(parsed.scheme == 'https')) resp = conn.getresponse() if resp.status // 100 != 2: - print 'Account deletion failed: %s %s' % (resp.status, resp.reason) + exit('Account deletion failed: %s %s' % (resp.status, resp.reason)) diff --git a/bin/swauth-delete-user b/bin/swauth-delete-user index de3ac3b12b..95025bc195 100755 --- a/bin/swauth-delete-user +++ b/bin/swauth-delete-user @@ -57,4 +57,4 @@ if __name__ == '__main__': ssl=(parsed.scheme == 'https')) resp = conn.getresponse() if resp.status // 100 != 2: - print 'User deletion failed: %s %s' % (resp.status, resp.reason) + exit('User deletion failed: %s %s' % (resp.status, resp.reason)) diff --git a/bin/swauth-list b/bin/swauth-list index 3f9ae5ea49..bbf5bfe9f1 100755 --- a/bin/swauth-list +++ b/bin/swauth-list @@ -75,9 +75,9 @@ If the [user] is '.groups', the active groups for the account will be listed. conn = http_connect(parsed.hostname, parsed.port, 'GET', path, headers, ssl=(parsed.scheme == 'https')) resp = conn.getresponse() - if resp.status // 100 != 2: - print 'List failed: %s %s' % (resp.status, resp.reason) body = resp.read() + if resp.status // 100 != 2: + exit('List failed: %s %s' % (resp.status, resp.reason)) if options.plain_text: info = json.loads(body) for group in info[['accounts', 'users', 'groups'][len(args)]]: diff --git a/bin/swauth-prep b/bin/swauth-prep index a7b912e60c..456cf3e4c8 100755 --- a/bin/swauth-prep +++ b/bin/swauth-prep @@ -56,4 +56,4 @@ if __name__ == '__main__': ssl=(parsed.scheme == 'https')) resp = conn.getresponse() if resp.status // 100 != 2: - print 'Auth subsystem prep failed: %s %s' % (resp.status, resp.reason) + exit('Auth subsystem prep failed: %s %s' % (resp.status, resp.reason)) diff --git a/bin/swauth-set-account-service b/bin/swauth-set-account-service index 0317546df5..acdba77962 100755 --- a/bin/swauth-set-account-service +++ b/bin/swauth-set-account-service @@ -70,4 +70,4 @@ Example: %prog -K swauthkey test storage local http://127.0.0.1:8080/v1/AUTH_018 conn.send(body) resp = conn.getresponse() if resp.status // 100 != 2: - print 'Service set failed: %s %s' % (resp.status, resp.reason) + exit('Service set failed: %s %s' % (resp.status, resp.reason)) diff --git a/doc/source/_theme/layout.html b/doc/source/_theme/layout.html index f0573a3b43..75d970baa8 100644 --- a/doc/source/_theme/layout.html +++ b/doc/source/_theme/layout.html @@ -58,7 +58,7 @@
- Psst... hey. Did you know you can read Swift 1.2 docs or Swift 1.1 docs also? + Psst... hey. Did you know you can read Swift 1.3 docs or Swift 1.2 docs also?
{%- endif %} diff --git a/doc/source/debian_package_guide.rst b/doc/source/debian_package_guide.rst index e8086adc16..eef9180a90 100644 --- a/doc/source/debian_package_guide.rst +++ b/doc/source/debian_package_guide.rst @@ -58,7 +58,7 @@ Instructions for Building Debian Packages for Swift apt-get install python-software-properties add-apt-repository ppa:swift-core/ppa apt-get update - apt-get install curl gcc bzr python-configobj python-coverage python-dev python-nose python-setuptools python-simplejson python-xattr python-webob python-eventlet python-greenlet debhelper python-sphinx python-all python-openssl python-pastedeploy bzr-builddeb + apt-get install curl gcc bzr python-configobj python-coverage python-dev python-nose python-setuptools python-simplejson python-xattr python-webob python-eventlet python-greenlet debhelper python-sphinx python-all python-openssl python-pastedeploy python-netifaces bzr-builddeb * As you diff --git a/doc/source/development_saio.rst b/doc/source/development_saio.rst index 9d0bce0a19..ce2a09e270 100644 --- a/doc/source/development_saio.rst +++ b/doc/source/development_saio.rst @@ -11,8 +11,8 @@ virtual machine will emulate running a four node Swift cluster. * Get the *Ubuntu 10.04 LTS (Lucid Lynx)* server image: - - Ubuntu Server ISO: http://releases.ubuntu.com/10.04/ubuntu-10.04.1-server-amd64.iso (682 MB) - - Ubuntu Live/Install: http://cdimage.ubuntu.com/releases/10.04/release/ubuntu-10.04-dvd-amd64.iso (4.1 GB) + - Ubuntu Server ISO: http://releases.ubuntu.com/lucid/ubuntu-10.04.2-server-amd64.iso (717 MB) + - Ubuntu Live/Install: http://cdimage.ubuntu.com/releases/lucid/release/ubuntu-10.04.2-dvd-amd64.iso (4.2 GB) - Ubuntu Mirrors: https://launchpad.net/ubuntu/+cdmirrors * Create guest virtual machine from the Ubuntu image. @@ -70,6 +70,7 @@ Using a loopback device for storage If you want to use a loopback device instead of another partition, follow these instructions. + #. `mkdir /srv` #. `dd if=/dev/zero of=/srv/swift-disk bs=1024 count=0 seek=1000000` (modify seek to make a larger or smaller partition) #. `mkfs.xfs -i size=1024 /srv/swift-disk` @@ -79,7 +80,6 @@ If you want to use a loopback device instead of another partition, follow these #. `mount /mnt/sdb1` #. `mkdir /mnt/sdb1/1 /mnt/sdb1/2 /mnt/sdb1/3 /mnt/sdb1/4` #. `chown