Fix fd leak from get_logger() in python 2.6

Calling get_logger({}) instantiates a logging.handlers.SyslogHandler,
which opens and keeps a socket around (either /dev/log or UDP or
whatever; not important).

Under Python 2.6, all logging handlers instantiated anywhere at all
will live for the entire lifetime of the program; they get stored in
logging._handlerList and logging._handlers. Python 2.7 is very
similar, but uses weakrefs instead of strong references in those
module-level variables, so logging handlers can actually get cleaned
up prior to program exit.

The net effect is that any program that calls get_logger() more than a
fixed number of times will leak file descriptors under Python 2.6.

This commit throws encapsulation out the window and, under 2.6 only,
replaces strong references with weakrefs in logging._handlerList and
logging._handlers, thus avoiding the leak.

Change-Id: I5dc0d1619c5a4500f892b898afd9e3668ec0ee7c
Allow multiple storage_domain in cname_lookup.

Implements: blueprint multiple-domains-in-domain-remap
Change-Id: Ia647f6777717e9ff4955ea66b29f072ac03d2785
Attempt to make test_memcache_pool_timeout stable

Too much time can pass after we create a set of co-routines and when
the parent co-routine continues is setup and staging. Instead, we
perform all the setup and staging, let the system run and then verify
the final state after all the dust settles.

Change-Id: I801148e380807119d3d6da5a24ba9cced39fb339
Closes-Bug: 1272503
Handle COPY verb in container quota middleware

The patch fix the ability to bypass the account
quota using the COPY verb. The quotas for destination
container are now checked before the copy.

Change-Id: I9f409ea6c0893f36972aa1fabe31fb143e151ab5
Fixes: bug #1259565
Remove swiftclient dependency

Removes the requirement for swiftclient in swift-dispersion-report
and swift-dispersion-populate. To prevent a dependency on
keystoneclient and to avoid reinventing the wheel with an internal
keystoneclient, authentication with keystone is only supported if
swiftclient is available. If not, only auth v1 is supported.

The dependency in swift/container/sync.py has also been removed.

Implements: blueprint remove-swiftclient-dependency

Change-Id: I6ec3b3c85a67b9ab6eb04b90ffc16daf1600e8a7
Fix recon docs

Change-Id: Icaa0f61e5796253dcc57b8c005577890de8aa537
Limit logged headers in proxy_logging middleware

Currently all headers are logged if access_log_headers are enabled in
proxy_logging middleware. By adding the option access_log_headers_only
it is now possible to limit the logged headers to the given header values.

DocImpact
Change-Id: I0a1e40567c9eddc9bb00dd00373dc6eeb33d347c
Merge "Attempt to make test_memcache_pool_timeout stable"
Merge "Remove swiftclient dependency"
Ensure swift.source is set for DLO/SLO requests

SLO was setting it sometimes (the PUT path), but not others (the GET
path), and DLO just wasn't doing it at all. One could already
distinguish DLO/SLO internal requests by the user agent, but we should
set swift.source too.

Change-Id: I5d5b7dd49bd1522a9c830d0abd21fff92ae79a39
Remove duplicate doc entry for swob

Fixes swob module being referenced twice in misc.rst
resulting in duplicate sections in the doc.

Also fixes build_sphinx warning for section underline
too short in middleware.rst.

Change-Id: Ibe44895f933a6503ca04ccd3a084bc0cfd913213
Added docs about the swift_source log field

Change-Id: I934230a006c856de844d8580f3b57f38a9845844
Merge "Ensure swift.source is set for DLO/SLO requests"
Small efficiency improvement for SLO range GET

If a client sends a GET request with a Range header for a SLO
manifest, SLO would notice this and perform a second GET request, sans
Range header, to retrieve the manifest body. Most of the time, this is
the sane thing to do: a subset of a SLO manifest is pretty much
useless. However, if the client has requested the first N bytes of the
large object, and the SLO manifest has N or fewer bytes, then the
response will actually have the whole manifest in it, so SLO doesn't
need to make a second request. (It's not wrong, just inefficient.)

Fortunately, ranged GET responses come with a Content-Range header
that tells us first byte, last byte, and total content length. Now SLO
detects whether or not a ranged GET response contains the full
manifest, and if so, just uses the existing response instead of making
another.

Change-Id: I63b991e08a1165eb3e88bd0620a1e64ef056fec6
Don't create bin/* files magically

Just use import to make scripts available in bin/ instead of
creating these during setup.py install.

Change-Id: I7318bbb77f6564ed58736887e711e1c497873471
small typo in cli/recon.py

Change "Can't check for async's on non object servers." to "Can't check
asyncs on non object servers."

Change-Id: I04f09187da73bb3709d11d8c6f3bb1901005a0cc
Merge "small typo in cli/recon.py"
Allow log disable in account/container server

Logging can be disabled in the object server, but not in the
account and container server though both sample configs already
include that setting. This patch allows to disable logging for
account and container server as well.

Functionality is ensured by some additional tests.

Closes-Bug: 1280954
Change-Id: Ia4e87911863089c3bea093d9f181ff29e9e963eb
Merge "Small efficiency improvement for SLO range GET"
Merge "Handle COPY verb in container quota middleware"