Support If-[Un]Modified-Since for object HEAD

We already supported it for object GET requests, but not for
HEAD. This lets clients keep metadata up-to-date without having to
either fetch the whole object when it's changed or do their own date
parsing. They can just treat Last-Modified as opaque and update their
idea of metadata when they get a 200.

Change-Id: Iff25d8989a93d651fd2c327e1e58036e79e1bde1
Set permissions on generated ring files

The use of NamedTemporaryFile creates rings with permissions 0600;
however most installs probably generate the rings as root but the
swift-proxy runs as user swift.

Set the permissions on the generated ring to 0644 prior to rename so
that the swift user can read the rings.

Change-Id: Ia511931f471c5c9840012c3a75b89c1f35b1b245
Closes-Bug: #1302700
Use eventlet instead of threading for timeout

The only explicit use of Python threading is found in the
testFileSizeLimit test. Using eventlet seems a bit easier to follow,
accomplishing the same goal, and does not constrain us to a
multi-threaded environment.

The chunks() and timeout() module level functions are only used by one
test each, so we just move them to those tests to indicate they are not
used globally.

Change-Id: I50b9fb798fbfd1d552b3c3f90309f6b86da34853
Merge "Set permissions on generated ring files"
Fix logging issue when services stop on py26

On older versions of python 2.6, exceptions would be spewed to the error
log whenever a service would stop.  This gets magnified by the
container-updater which seems to do it with every pass.  This catches
and squelches the error.

Change-Id: I128c09c240e768e8195af1f6fe79b10d4e432471
Closes-Bug: #1306027
Add includes of referenced SAIO bin scripts

Change-Id: I6810e69a757336a3aed0a38146c27f270fe2dde1
Fix logging issue when services stop on py26

On older versions of python 2.6, exceptions would be spewed to the error
log whenever a service would stop.  This gets magnified by the
container-updater which seems to do it with every pass.  This catches
and squelches the error.

Change-Id: I5944c1620c62cf0868b70dae7d7e2acd56bf8211
Closes-Bug: #1306027
Check swift.conf MD5 with recon

I've seen several folks recently have problems with their Swift
clusters because they had different hash prefixes on different
nodes. Let's help them out by having recon check that.

Note that MD5-equality is stronger than what we need (which is
ConfigParser-equality for a particular set of keys), but this way we
don't expose the secret hash prefix and suffix across the internal
network, just the MD5 checksum of the file containing them.

Change-Id: I3af984ee45947345891b3c596a88e3464f178cc7
Merge "Use eventlet instead of threading for timeout"
Merge "Fix logging issue when services stop on py26"
Merge "Add includes of referenced SAIO bin scripts"
Print 'Container Count' in data base info

Currently, 'Container Count' was missing in data base info.
So this patch will help printing 'Container Count' also.

Change-Id: I1ca80ee79e71b086b30fd2d1ab024ea1cfb324f5
Merge "Support If-[Un]Modified-Since for object HEAD"
Merge "Print 'Container Count' in data base info"
Load constraints from cluster info dictionary

Use constrainst from the new "swift-constraints" section of test.conf,
fall back to those found in the response to the /info API call,
ultimately falling back to the constraints module's effective
constraints.

Change-Id: Iea01c9c4b5148faa10004a240df411cbe7336a6a
Fix testcase test_print_db_info_metadata()

Test compares cluster info to hardcoded expected data and wasn't
sorting the two sets of things being compared leading to some
sporadic unit test failures.

Change-Id: I3ef98260a62c15d06ba8cc196196d4e90abca3f0
Fix test-requirements.txt

mock >= 1.0 changed the behavior for iterable sideeffects. Any
exceptions in an iterable side_effect will now be raised instead of
returned.

With mock < 1.0 tests are failing, because test for the
internal client (TestSimpleClient.test_get_with_retries) use an
iterable sideeffect that raise an URLError on the first request
and pass on the second request.

Change-Id: I568b68c33ff599d7a4f590e2a0eb8caeee4b4d4e
Bring Object Auditor Coverage To 99%

Previously at 87% with 20 missing 11 partial, this additional
test code brings it to 99% 0 missing and 3 partial.  Noticed
some easy places to add coverage while working on the
Storage Policy branch.

Change-Id: I49b5b4db3341416fce1ef42811732c16d3265522
Merge "Bring Object Auditor Coverage To 99%"
Fix error log of proxy-server when cache middleware is disabled

Change-Id: I0b67721cbb692fb8d2a5dd8b2c4f5383512b7b45
Closes-Bug: #1306591