Reject object names with Unicode surrogates

Technically, you can't encode surrogates into UTF-8 at all, but Python
2 lets you get away with it. Python 3 does not.

We already have a check for surrogate pairs (commit 0080337), but not
one for lone surrogates. This commit forbids object names with lone
surrogates in them.

The problem with surrogates is trivially reproducible:

    swift@saio:~$ python2.7
    Python 2.7.3 (default, Feb 27 2014, 19:58:35)
    [GCC 4.6.3] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> b'\xed\xa0\xbc'.decode('utf-8')
    u'\ud83c'
    >>>

    swift@saio:~$ python3.3
    Python 3.3.5 (default, Aug  4 2014, 15:27:24)
    [GCC 4.6.3] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> b'\xed\xa0\xbc'.decode('utf-8')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 0: invalid continuation byte
    >>>

See also http://bugs.python.org/issue9133

Change-Id: I7c31022e8a028c3cdf2ed1586349509d96cfded9
Make error limits survive a ring reload

The proxy was storing the error count and last-error time in the
ring's internal data, specifically in the device dictionaries. This
works okay, but it means that whenever a ring changes, all the error
stats reset.

Now the error stats live in the proxy server object, so they survive a
ring reload.

Better yet, the error stats are now keyed off of the node's
IP/port/device triple, so if you have the same device in two rings
(like with multiple storage policies), then the error stats are
combined. If the proxy server sees a 507 for an objec request in
policy X, then that will now result in that particular object disk
being error-limited for requests in policies Y and Z as well.

Change-Id: Icc72b68b99f37367bb16d43688e7e45327e3e022
Handle os.listdir failures in object-updater

While investigating bug 1375348 I discovered the problem
reported there was not limited to the object-auditor.  The
object-updater has similar bugs.

This patch catches the unhandled exception that can be thrown
by os.listdir if the self.devices directory is inaccessible.

Change-Id: I6293b840916bb63cf9eebbc05068d9a3c871bdc3
Related-bug: 1375348
Remove invalid connection checking in db_replicator

Account/Container-replicator checks connection generation and timeout
in HTTP REPLICATE Request in _repl_to_node, but it doesn't really checks
connection but only construction of ReplConnection class.
This patch removes that invalid checking.

Change-Id: Ie6b4062123d998e69c15638b741e7d1ba8a08b62
Closes-Bug: #1359018
Fix typos in overview_large_objects and versioning doc


Change-Id: I1a919ad1b0298d5817f9eb2caf5e3bd7b3243c2c
Fix 2 typos in admin_guide file

Change-Id: Ibf1e5dbf6ff4747c7f23f6638321ab41bba3021b
Fix typo in apache_deployment doc

Change-Id: I42d76f544290dbda62633de90608d41caadac084
Merge "Fix typos in overview_large_objects and versioning doc"
Merge "Fix typo in apache_deployment doc"
Correct misspelled words

In some files I found misspelling words.

bin/swift-reconciler-enqueue#l26
   primarly => primarily
swift/account/backend.py#l309
   ommited => omitted
swift/container/replicator.py#l158
   successfull => successful
test/unit/account/test_backend.py#1450
   non_existant_policy_index => non_existent_policy_index
test/unit/account/test_backend.py#1451
   'test-non-existant-policy'=> 'test-non-existent-policy'
test/unit/account/test_backend.py#1453
   non_existant_policy_index => non_existent_policy_index

Change-Id: I976236e3200a6fbdc20be464acff182b6cface81
Merge "Remove invalid connection checking in db_replicator"
Merge "Handle os.listdir failures in object-updater"
Merge "Make error limits survive a ring reload"
Imported Translations from Transifex

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: Ibf319f7cc1b5036ad8031776cf2c6018fb8a0159
Fix tempfile bugs from commit 6978275

Commit 6978275 changed xprofile middleware's usage of mktemp
and moved to using tempfile. But it was clearly never tested,
because the os.close() calls never worked. This patch updates
that previous patch to use a context to open and close the file.

Change-Id: I40ee42e8539551fd8e4dfb353f50146ab40a7847
Merge "Reject object names with Unicode surrogates"