Allow empty reseller prefixes in domain_remap

Change-Id: I2013e4686fce1c06626ec974f8d721721e6ca6e7
Remove fake _get_part and use the real thing

The get_part method is fast and stable given a consistent hash path
suffix/prefix, so there's no absolute requirement for the fake
implementation other than convenience.  OTOH, removing the fake
implementation and fixing the tests that were relying on it should make
it easier to write better tests going forward and harder to hide bugs
that don't show up when using the fakes.

There may be some overhead when writing new tests that use the ring if
you're making assertions on partitions or paths, but with a part power
of zero it's normally trivially obvious when a 1 needs to be a 0 or vice
versa.  Or you can just drop the assertions around the parts you were
faking anyway.

Change-Id: I8bfc388a04eff6491038991cdfd7686c9d961545
Multithread optimization for object updater

This change makes the object updater work the same
as the container updater, which is that it now
spawns one thread for each node that it needs to
update. This should help optimize its
performance/efficiency.

Change-Id: If740b8c67c0d953e4b510913bd8594570d868da6
Fix sporadic false failure in xprofile unit test code (master)

Same fix as is going through on feature/ec, fixed it there first
as it was happening often and no point in waiting until EC is
complete before getting it over to master...

Appears that what's been happening on feature/ec lately
with a middleware failure has to do with a hardcoded PID in
the test code itself causing a profile file to exist when
its not expected to by the test.

Test code used a PID of 135 and based on how get_logfiles()
is written, any real PID that starts with 135 will cause a
false failure in test_call().  This can be seen via inspection
and confirmed in logfiles where all captured assertions show
a profile filename beginning with 135.  Tried getting smarter
about choosing a fake PID (int) but then decided it was 100%
safe to use 'ABC' for this test since that'll never show up!

Change-Id: I958f1525c2727b3fb3f533242fa509fa8e59926c
Respect device weights when adding replicas

Previously, any new (partition, replica) pairs created by adding
replicas were spread evenly across the whole ring. Now it respects
device weights, so more (partition, replica) pairs are placed on
higher-weight devices.

Note that this only affects partition assignment *when the replica
count is increased*. Normal adding of disks without changing the
replica count is, and was, just fine.

The cause was that the devices' parts_wanted values weren't being
updated when the replica count went up. Since adding replicas makes
more things to assign, each device's desired share should have gone
up, but it didn't. This appears to be a simple oversight on the part
of the original author (me).

Change-Id: Idab14be90fab243c1077a584396a9981a4bd8638
Let admins add a region without melting their cluster

Prior to this commit, swift-ring-builder would place partitions on
devices by first going for maximal dispersion and breaking ties with
device weight. This commit flips the order so that device weight
trumps dispersion.

Note: if your ring can be balanced, you won't see a behavior
change. It's only when device weights and maximal-dispersion come into
conflict that this commit changes anything.

Example: a cluster with two regions. Region 1 has a combined weight of
1000, while region 2 has a combined weight of only 400. The ring has 3
replicas and 2^16 partitions.

Prior to this commit, the balance would look like so:

  Region 1: 2 * 2^16 partitions
  Region 2: 2^16 partitions

After this commit, the balance will be:

  Region 1: 10/14 * 2^16 partitions  (more than before)
  Region 2: 4/14 * 2^16 partitions  (fewer than before)

One consequence of this is that some partitions will not have a
replica in region 2, since it's not big enough to hold all of them.

This way, a cluster operator can add a new region to a single-region
cluster in a gradual fashion so as not to destroy their WAN link with
replication traffic. As device weights are increased in the second
region, more replicas will shift over to it. Once its weight is half
that of the first region's, every partition will have a replica there.

DocImpact

Change-Id: I945abcc4a2917bb12be554b640f7507dd23cd0da
Merge "Fix sporadic false failure in xprofile unit test code (master)"
Merge "Remove fake _get_part and use the real thing"
Merge "Respect device weights when adding replicas"
Merge "Let admins add a region without melting their cluster"
authors and changelog updates for 2.1.0 release

Change-Id: I457674f564dcacf0fd20004e9a3bb85113f53aa5
Merge "Multithread optimization for object updater"
Merge "authors and changelog updates for 2.1.0 release"
added Alex to AUTHORS

Change-Id: I2d147415e65c0f19159b995fc4eca78e075537b6
container merge_items speedup

I rewrote ContainerBroker.merge_items to use bulk SQL operations.  This
performs identical to the current version when len(item_list) == 1.  But as
item_list grows, the new version performs better, up to around 50% faster when
item_list numbers in the hundreds.

I wrote a quick script to stress test merge_items:
https://gist.github.com/redbo/12a4ed9c6a020aee39fe

Average of several runs against master: 35.08 seconds
Average of several runs against this branch: 18.44 seconds

Change-Id: I07fff1fb05c90f1411c79d961e0ed63264ed2acf
Merge "container merge_items speedup"
Merge "Allow empty reseller prefixes in domain_remap"