Sanify handoff search depth with non-integer replica counts

On GET, the proxy will go search the primary nodes plus some number of
handoffs for the account/container/object before giving up and
returning a 404. That number is, by default, twice the ring's replica
count. This was fine if your ring had an integral number of replicas,
but could lead to some slightly-odd behavior if you have fractional
replicas.

For example, imagine that you have 3.49 replicas in your object ring;
perhaps you're migrating a cluster from 3 replicas to 4, and you're
being smart and doing it a bit at a time.

On an object GET that all the primary nodes 404ed, the proxy would
then compute 2 * 3.49 = 6.98, round it up to 7, and go look at 7
handoff nodes. This is sort of weird; the intent was to look at 6
handoffs for objects with 3 replicas, and 8 handoffs for objects with
4, but the effect is 7 for everybody.

You also get little latency cliffs as you scale up replica counts. If,
instead of 3.49, you had 3.51 replicas, then the proxy would look at 8
handoff nodes in every case [ceil(2 * 3.51) = 8], so there'd be a
small-but-noticeable jump in the time it takes to produce a 404.

The fix is to compute the number of handoffs based on the number of
primary nodes for the partition, not the ring's replica count. This
gets rid of the little latency cliffs and makes the behavior more like
what you get with integral replica counts.

If your ring has an integral number of replicas, there's no behavior
change here.

Change-Id: I50538941e571135299fd6b86ecd9dc780cf649f5
Documentation of the logs formats used in Swift

Change-Id: I402014627bab7113105a6a63c0b0ce1267735ca0
Fix container quota MW for handling a bad source path

The copy source must be container/object.
This patch avoids the server to return
an internal server error when user provides
a path without a container.

Fixes: bug #1255049
Change-Id: I1a85c98d9b3a78bad40b8ceba9088cf323042412
Add missing sample config of object-replicator

Change-Id: I2bca67023aeb9a012927c69e23d582d4a0ff2098
Add some tests for bin/swift-recon

Fix also minor bug in zone filtering when zone set to 0.

Moved bin/swift-recon to swift/cli/recon.py, which makes
it possible to import it without using some scary hacks.
bin/swift-recon is now created by setup.py install.

Closes-Bug: #1261692
Change-Id: Id0729991c8ece73604467480dbf93fec7d8eb196
Reduce line count by two

Change-Id: Ib0ee2bb5b202966d3d07c754656c92006149af9c
Fix up double mocking of swob.Request.__init__

From Pete Zaitcev's work on PBes (https://review.openstack.org/47713):

  Fixes up a problem with double mocking of Request.__init__, which
  should be seen in stock code as well.

Change-Id: Ibf8103425404b03aaab9a4e97a3a62d0fb8dbb14
Merge "Reduce line count by two"
Merge "Fix container quota MW for handling a bad source path"
Merge "Add some tests for bin/swift-recon"
Merge "Documentation of the logs formats used in Swift"
Merge "Add missing sample config of object-replicator"
Fix numbering of steps in proxy section of install_multinode

Steps were numbered 1, 2, (note reset), 1, 2, etc. Then a user says:
"I'm on Step 2 in Proxy section, er..."

See a bug, fix a bug.

Change-Id: If6f32b3a33e1070e705812df7ab299e6736c9806
Merge "Sanify handoff search depth with non-integer replica counts"
Merge "Fix up double mocking of swob.Request.__init__"
Merge "Fix numbering of steps in proxy section of install_multinode"