Return an exit code for configuration errors

Red Hat's QA noticed that in case of the infamous "xattr>=0.4"
error, swift-init exits with a zero error code, which confuses
startup scripts (not Systemd though -- that one knows exactly
if processes run or not).

The easiest fix is to return the error code like Guido's blog
post suggested.

Change-Id: I7badd8742375a7cb2aa5606277316477b8083f8d
Fixes: rhbz#1020480
Increases the UT coverage of db_replicator.py

Adds 20 unit tests to increase the coverage of db_replicator.py
from 71% to 90%

Change-Id: Ia63cb8f2049fb3182bbf7af695087bfe15cede54
Closes-Bug: #948179
Make ssync_receiver drop conn on exc

Before, the ssync receiver wouldn't hang up the connection with all
errors. Now it will. Hanging up early will ensure the remote end gets
a "broken pipe" type error right away instead of it possible sending
more data for quite some time before finally reading the error.

Change-Id: I2d3d55baaf10f99e7edce7843a7106875752020a
Use files in the source tree instead of cut/paste

Many of the large files are included in the tree and the script now
leverages a checked out swift tree to provide those files so that
users don't have to cut/paste text from the document. The contents of
those files are still included in the document for reference.

Updated to add sudo in appropriate places so that the entire script
can be run as the user instead of as root.

We also simplify the steps needed to get resetswift script working
(don't need to edit the user name).

Change-Id: Ie5b5a815870edcc205d273e35e0bbd2426d3b002
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Adds a retry mechanism when deleting containers

Bulk middleware now has a mechanism to retry a delete when the
HTTP response code is 409. This happens when the container still
has objects. It can be useful in a bulk delete where you delete
all the objects in a container and then try to delete the container.
It is very likely that at the end it will fail because the replica
objects have not been deleted by the time the middleware got a
successful response.

Change-Id: I1614fcb5cc511be26a9dda90753dd08ec9546a3c
Closes-Bug: #1253478
Sync global requirements to pin sphinx to sphinx>=1.1.2,<1.2

Sync the global requirements to pin sphinx.  This addresses an issue
where Sphinx 1.2 is not building documents correctly and causing
check/gate to fail.

We also had to adjust the pip command used.

Change-Id: I8894c0199db845e90e5086a7c0e6bb7c7a26b5a0
Remove start index 0 in range()

Remove the useless arg ("start index" = 0) in files, since its default
value is 0, to make code cleaner.

Fixes bug #1259750

Change-Id: I52afac28a3248895bb1c012a5934d39e7c2cc5a9
Use /info to check if SLO is enabled

The functional tests have some hokey detection of SLO support that
pre-dates the /info API, but we can do better now.

Also moved the SLO check up inside the setUp method so that skipping
the SLO tests should be somewhat faster now.

Change-Id: I645718b459d794a9a97770f7162934558c94f3e8
Merge "Increases the UT coverage of db_replicator.py"
Updates tox.ini to use new features

tox 1.6 allows us to skip the sdist step, which is slow. This does that.
It also allows us to override the install line. In this case, it's
important as it allows us to stop getting pre-release software we
weren't asking for.

Original patch by Monty Taylor, talked about here:
http://lists.openstack.org/pipermail/openstack-dev/2013-September/015495.html

Change-Id: I2042cae5ebf5467408fe6cdb71f6147081b72ca6
Bring obj server unit tests to > 98%

This set of changes attempts to bring the unit test coverage to over
98% for the object server module.

Two changes to the object server are made with this patch:

1. The try/except block around diskfile.write_metadata() was removed
   at the end of the POST method

The write_metadata() method of the DiskFile module does not raise
either the DiskFileNotExist or DiskFileQuarantined exceptions on that
code path.

2. The conditional container_update() call was removed at the end of
   the PUT method

The container_update() calls is performed when a new object is created
or when an exist object is updated. Since we already report old
timestamps as 409s (Conflict) we always perform the update.

We also fix an existing test to clear the hash prefix so that it can
actually detect the async pending pickle file creation for a failure
mode.

Change-Id: I71ec9dcf7c0ac86e56aa0f06993d501fdfa22d5b
Merge "Use /info to check if SLO is enabled"
Add some tests to demonstrate hash_cleanup_listdir

We add some tests to verify various behaviors of
hash_cleanup_listdir(), and break them into individual tests so that
one failure won't prevent the others from running as well.

Change-Id: I4f52388d813f061b8e7d2b45dfb0f805689020c2
Expose allowed tempurl methods in /info

Clients can construct tempurls for any method, but they only work if
they're in this list, so it's helpful for clients to see the list.

Change-Id: Id852f457d65b62c4fe79db01b1d7029a5fa5aa09
Expose basic constraints in /info

Change-Id: I70649e0669e2f7a1d61742a16ed6dc792d4b2a5a
Merge "Return an exit code for configuration errors"
Only retry GETs for objects.

Change-Id: I8b6ceeaa0e5e247e45209deced808b0b78181d53
Update swift-config paste appconfig inspection

This crafts a significantly more informative and complete picture of the
appconfig object after paste has gotten a hold of it.

Change-Id: I07d7248ecf384f32d333025874ecb2782c58d6af
Merge tag '1.11.0'

Swift 1.11.0

Change-Id: I77b95a693c2422f0929e96d8e42a00e53b57089e
Merge "Bring obj server unit tests to > 98%"