Faster swift-dispersion-populate

- Makes swift-dispersion-populate a bit faster when using a larger
  dispersion_coverage with a larger part_power.
- Adds option to only run population for container OR objects
- Adds option to let you resume population at given point (useful if you
  need to resume population after a previous run error'd out or the
  like) by specifying which suffix to start at.

The original populate just randomly used uuid4().hex as a suffix on the
container/object names until all the partition's required where covered.
This isn't a big deal if you're only doing 1% coverage on a ring with a
small part power but takes ages if you're doing 100% on a larger ring.

Change-Id: I52f890a774412c1d6179f12db9081aedc58b6bc2
Handle X-Copy-From header in container_quota middleware

Content length of the copied object is checked before
allowing the copy request according to the container quota.

Closes-Bug: #1201875
Change-Id: If44b916791e94ac6c66eee04a5727186ce0e56ae
Two small account-quota fixes

First: even if a user has exceeded their account quota, they should be
able to make object POST requests. Updating an object's metadata isn't
going to make them any more over quota, so should be allowed.

Second: don't bother with the reseller_admin check for container or
object requests. If I send the header X-Account-Meta-Quota-Bytes: 100
on e.g. an object PUT request, the proxy will (rightly) ignore it. Now
account-quotas does too.

Change-Id: I970a76349659acdd8229a324bd33bfe7fe7261a4
Fix utf-8 handling in object versions.

Fixes object versioning when object name and/or version
container name contain multibyte utf-8 characters.

When object names containing non-ASCII characters
are PUT multiple times into a container with an
x-versions-location set, subsequent DELETE of the
object results in a 500 response status.

When the versions container name contains
non-ASCII characters the first delete of an object
succeeds but fails to restore previous version of
object, so second delete incorrectly returns 404.

Fixes bug 1229142

Change-Id: I425440f76b8328f8e119d390bfa4c7022181e89e
Make test_translations test our tree

In order to run the correct classes, Python test framework adjusts
sys.path. However, these changes are not propagated to subprocesses.
Therefore, the test actually tries to test installed Swift, not
the one in which it is running.

The usual suggestion is to run "python setup.py develop" before
testing, but it's annoying and error-prone. If you forget it,
you may test the code in /usr very easily, and never know.

Let's just pass the correct path to subprocess. Much safer.

Change-Id: Ic71314e8462cf6e0579d704ffe9fbbfac7e6ba24
Revert "Refactor common/utils methods to common/ondisk"

This reverts commit 7760f41c3ce436cb23b4b8425db3749a3da33d32

Change-Id: I95e57a2563784a8cd5e995cc826afeac0eadbe62
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Don't apply timeout to Pool.get operation (leaks)

The connection timeout to a memcache server is performed by using the
"with Timeout()" construct over the sock.connect() call in the
.create() method. In addition, the same construct was being applied to
the Pool.get() call in ._get_conns().

If the maximum number of connections was already created, and the
Pool.get() called took longer than the connect timeout, then the error
handling path would add a place holder to the connection
pool. Eventlet's Pool class allows for additional items to be added to
the pool, over and above the max_size setting. This additional place
holder will eventually be pulled and a new connection created to take
its place.

The fix is to remove the timeout construct in the _get_conns() method.

In addition, we also apply the unit test patch mentioned in the review
comments for Patch Set 6 of https://review.openstack.org/45134,
located at http://paste.openstack.org/show/47288/.

Fixes bug 1235027

Change-Id: I786cabefe3e8ddf7d92feb7ebc7cfb613d60a1da
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Add a Timeout when getting Memcache connections

The old Timeout behavior when pulling connections of the MemcacheConnPool left
ambiguity around what timed out and could put more placeholders in the queue
than the configured max_connections.

To avoid waiting indefinitely on slow severs we raise a custom Timeout when we
fail get a connection from the pool.  We still error limit the slow server,
and move onto the next, but we still don't allow more than max_connections.

Change-Id: I9e2409896423d52da69e35c038e5f457c71f705d
Merge "Two small account-quota fixes"
allow container create even if over account quota

Change-Id: I07278bc3314c26426ff0557fe2f5c69c02d6550c
Merge "Don't apply timeout to Pool.get operation (leaks)"
Merge "Revert "Refactor common/utils methods to common/ondisk""
Merge "Fix utf-8 handling in object versions."
Merge "allow container create even if over account quota"
CHANGELOG and AUTHORS updates for 1.10.0 release

Change-Id: Iaf8d289c5ddb6ac778243a5e1fc27600bade6feb
Merge "Add a Timeout when getting Memcache connections"
Merge "CHANGELOG and AUTHORS updates for 1.10.0 release"
Fix 500 from account-quota middleware

If a user had set X-Account-Meta-Quota-Bytes to something non-integer
prior to the installation of the account-quota middleware, then the
quota check would choke on it. Now a non-integer value is treated as
"no quota".

Change-Id: I5c38911be1f66fa293aea9c78590d4ce7d184113
Small efficiency improvement in account quotas

If you were performing an object PUT with X-Copy-From and you had
account_quotas in your pipeline but your account did not have a quota
set, then we will now avoid an unnecessary call to get_object_info().

Change-Id: I8592d4ad65e45ecf9e0557bc10ce2c2db19732e8
Merge "Handle X-Copy-From header in container_quota middleware"